mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-21 21:25:59 +02:00
Docs: LCL/grids. Updates topics based on forum suggestions by Werner Pamler, including:
* TGridColumns.VisibleCount * TGridColumns.Enabled * TCustomStringGrid.LoadFromCSVStream * TCustomStringGrid.LoadFromCSVFile
This commit is contained in:
parent
2acd136518
commit
a9a62d33f8
@ -6671,20 +6671,38 @@ existing <var>TGridColumn</var> class instance.
|
|||||||
|
|
||||||
<element name="TGridColumns.VisibleCount">
|
<element name="TGridColumns.VisibleCount">
|
||||||
<short>The number of visible columns in the collection.</short>
|
<short>The number of visible columns in the collection.</short>
|
||||||
<descr/>
|
<descr>
|
||||||
<seealso/>
|
<p>
|
||||||
|
<var>VisibleCount</var> is a read-only <var>Integer</var> property with the
|
||||||
|
number of visible TGridColumn instances in the collection. In the current LCL
|
||||||
|
version, the property contains the value for the Count property in the
|
||||||
|
collection. In prior LCL versions, the value was calculated as the number of
|
||||||
|
TGridColumn instances in Items with their Visible properties set to <b>True</b>.
|
||||||
|
</p>
|
||||||
|
</descr>
|
||||||
|
<seealso>
|
||||||
|
<link id="TGridColumns.Count"/>
|
||||||
|
<link id="TGridColumn.Visible"/>
|
||||||
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TGridColumns.Enabled">
|
<element name="TGridColumns.Enabled">
|
||||||
<short>Indicates if the column collection is enabled.</short>
|
<short>Indicates if the column collection is enabled.</short>
|
||||||
<descr>
|
<descr>
|
||||||
<p>
|
<p>
|
||||||
Enabled is a read-only Boolean property which indicates if columns in the
|
<var>Enabled</var> is a read-only <var>Boolean</var> property which indicates
|
||||||
collection can be used in the associated Grid control. Enabled is <b>True</b>
|
if columns in the collection can be used in the associated Grid control.
|
||||||
when VisibleCount contains a value greater than 0 (zero).
|
Enabled is <b>True</b> when Count contains a value greater than 0 (zero).
|
||||||
|
Please note: In prior LCL versions, the value in VisibleCount was checked to
|
||||||
|
determine the Enabled state. In the current LCL version, VisibleCount and Count
|
||||||
|
return the same value.
|
||||||
</p>
|
</p>
|
||||||
</descr>
|
</descr>
|
||||||
<seealso/>
|
<seealso>
|
||||||
|
<link id="TGridColumns.Count"/>
|
||||||
|
<link id="TGridColumns.Grid"/>
|
||||||
|
<link id="TGridColumns.Items"/>
|
||||||
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TGridCoord">
|
<element name="TGridCoord">
|
||||||
@ -24248,7 +24266,7 @@ marker.
|
|||||||
are treated as fixed column titles in the grid. When set to <b>True</b>,
|
are treated as fixed column titles in the grid. When set to <b>True</b>,
|
||||||
each column value is stored as the caption for the corresponding entry in
|
each column value is stored as the caption for the corresponding entry in
|
||||||
the Columns collection (when enabled). If Columns are not used, the values
|
the Columns collection (when enabled). If Columns are not used, the values
|
||||||
are stored as cell data in row number 0. When set to <b>False</b>, the first
|
are stored as Cell data in row number 0. When set to <b>False</b>, the first
|
||||||
row is treated as cell data. The default value is <b>True</b>.
|
row is treated as cell data. The default value is <b>True</b>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@ -24271,11 +24289,14 @@ provides support for converting character encodings when needed.
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
LoadFromCSVStream ensures that the grid control has enough columns to
|
LoadFromCSVStream ensures that the grid control has enough columns to
|
||||||
represent the values read from the stream. When Columns is enabled, its Add
|
represent the values read for each record or row in the stream. When Columns is
|
||||||
method is called to create additional columns (when needed). If this occurs
|
enabled (i. e. Columns.Count has a non-zero value), the Delete and Add methods
|
||||||
on the first line and UseTitles is enabled, cell values are stored as the
|
in Columns are called to recreate column definitions for the number of
|
||||||
Title for each of the columns. If Columns is not enabled, the value in
|
delimited values read from the stream. If this occurs on the first line and
|
||||||
ColCount is updated to reflect the number of columns read from the stream.
|
UseTitles is enabled, each value in the row is stored as the Title for the
|
||||||
|
corresponding TGridColumn instance in Columns. If Columns is not enabled, the
|
||||||
|
value in ColCount is updated with the number of columns read from the stream
|
||||||
|
and the values are stored in the first row (0) in the Cells property.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Please note that updates to the control occur in a BeginUpdate..EndUpdate
|
Please note that updates to the control occur in a BeginUpdate..EndUpdate
|
||||||
@ -24351,18 +24372,21 @@ characters is encountered, they are processed as an end-of-line
|
|||||||
marker.
|
marker.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<var>UseTitles</var> indicates whether the first row of values are treated
|
<var>UseTitles</var> indicates whether the first row of values in the file
|
||||||
as fixed column titles in the grid. When set to <b>True</b>, each column
|
are treated as fixed column titles in the grid. When set to <b>True</b>,
|
||||||
value is stored as the caption for the corresponding entry in the Columns
|
each column value is stored as the caption for the corresponding entry in
|
||||||
collection (when enabled). If Columns are not used, the values are stored as
|
the Columns collection (when enabled). The Columns collection is enabled when
|
||||||
cell data in row number 0. When set to <b>False</b>, the first row is
|
its Count property has a positive non-zero value. If Columns are not used, the
|
||||||
treated as cell data. The default value is <b>True</b>.
|
values are stored as Cell data in row 0. If UseTitles is set to <b>False</b>,
|
||||||
|
the first row is treated as Cell data in row 0. The default value for UseTitles
|
||||||
|
is <b>True</b>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<var>FromLine</var> indicates the ordinal line number that is the first row
|
<var>FromLine</var> indicates the ordinal line number that is the first row
|
||||||
loaded in the method. The default value is 0, and causes processing to begin
|
loaded in the method. The default value is 0, and causes processing to begin
|
||||||
at the first line. When a positive non-zero value is used, the lines are
|
at the first line. When a positive non-zero value is used, the specified number
|
||||||
skipped by reading the corresponding number of end-of-line sequences.
|
of lines are skipped by reading the corresponding number of end-of-line
|
||||||
|
sequences.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<var>SkipEmptyLines</var> indicates whether blank lines are skipped when the
|
<var>SkipEmptyLines</var> indicates whether blank lines are skipped when the
|
||||||
@ -24371,7 +24395,8 @@ row and column values are loaded in the method. The default value is
|
|||||||
skipped.
|
skipped.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Use LoadFromCSVStream to load comma-separated values from a TStream instance.
|
Use LoadFromCSVStream to load delimited row and column values from a TStream
|
||||||
|
instance.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Use SaveToCSVFile or SaveToCSVStream to store the content in the grid as
|
Use SaveToCSVFile or SaveToCSVStream to store the content in the grid as
|
||||||
@ -24388,6 +24413,7 @@ comma-separated values.
|
|||||||
<link id="TCustomDrawGrid.FixedRows"/>
|
<link id="TCustomDrawGrid.FixedRows"/>
|
||||||
<link id="TGridColumns"/>
|
<link id="TGridColumns"/>
|
||||||
<link id="TGridColumn.Title"/>
|
<link id="TGridColumn.Title"/>
|
||||||
|
<link id="#lazutils.lcsvutils.LoadFromCSVFile">LoadFromCSVFile</link>
|
||||||
</seealso>
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
<element name="TCustomStringGrid.LoadFromCSVFile.AFilename">
|
<element name="TCustomStringGrid.LoadFromCSVFile.AFilename">
|
||||||
@ -24461,7 +24487,7 @@ included in the output is written using the value in ADelimiter to separate
|
|||||||
the adjacent column values. A column value is enclosed by quote characters
|
the adjacent column values. A column value is enclosed by quote characters
|
||||||
if its content contains whitespace or the delimiter character defined in
|
if its content contains whitespace or the delimiter character defined in
|
||||||
ADelimiter. Each row is terminated with the end-of-line sequence used in the
|
ADelimiter. Each row is terminated with the end-of-line sequence used in the
|
||||||
LCL.
|
LCL platform.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
No actions are performed in the method if either RowCount or ColCount are
|
No actions are performed in the method if either RowCount or ColCount are
|
||||||
|
Loading…
Reference in New Issue
Block a user