mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 02:59:26 +02:00
Docs: LCL/grids. Updates TCustomStringGrid.Modified topic to reflect usage.
This commit is contained in:
parent
b72d31e3dc
commit
5b0ed449f3
@ -23613,17 +23613,55 @@ coordinates.
|
|||||||
</element>
|
</element>
|
||||||
|
|
||||||
<element name="TCustomStringGrid.Modified">
|
<element name="TCustomStringGrid.Modified">
|
||||||
<short>Indicates if the content in the grid cells has been changed.</short>
|
<short>
|
||||||
|
Indicates whether the content in the grid cells has been changed.
|
||||||
|
</short>
|
||||||
<descr>
|
<descr>
|
||||||
<p>
|
<p>
|
||||||
The value in <var>Modified</var> is set to <b>False</b> when Loaded using
|
<var>Modified</var> is a <var>Boolean</var> property which indicates whether
|
||||||
the LCL streaming mechanism. The value in Modified is changed to <b>True</b>
|
the cell content in the grid control has been changed. Modified is set to
|
||||||
when the <var>Cells</var> property is updated in the <var>SetCells</var>
|
<b>True</b> when the <var>Cells</var> property is updated and the
|
||||||
method.
|
<var>SetCells</var> method is called to apply the new value. This occurs when
|
||||||
|
a cell is edited using a built-in cell editor, or when a value is directly
|
||||||
|
assigned to the Cells property.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<var>Modified</var> is set to <b>False</b> when the control is Loaded using
|
||||||
|
the LCL streaming mechanism.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Methods which use Cells to indirectly assign value(s) also set Modified to
|
||||||
|
<b>True</b>. These include: AssignTo, SelectionSetText, SelectionSetHTML,
|
||||||
|
SetCheckBoxState, SetEditText, LoadContent, Clean, InsertRowWithValues,
|
||||||
|
LoadContent, LoadFromFile, LoadFromStream, LoadFromCSVFile and
|
||||||
|
LoadFromCSVStream.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
In contrast, methods which perform row or column operations without changing
|
||||||
|
Cells do <b>not</b> cause the Modified property to be set. These are generally
|
||||||
|
methods from an ancestor class where Modified does not exist, and include:
|
||||||
|
ClearCols, ClearRows, DeleteColRow, DeleteCol, DeleteRow, ExchangeColRow,
|
||||||
|
InsertColRow, MoveColRow, SortColRow, DoOPDeleteColRow, DoOPExchangeColRow,
|
||||||
|
DoOPInsertColRow, and DoOPMoveColRow.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The event handlers signalled from these methods can be used to update the
|
||||||
|
value in Modified, including: OnColRowDeleted, OnColRowExchanged,
|
||||||
|
OnColRowInserted, OnColRowMoved, and OnCompareCells. Or, as an alternative,
|
||||||
|
update Modified from an event handler like OnClick assigned to the control
|
||||||
|
which triggers one of these operations.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Methods which save the grid content do <b>not</b> reset the value in Modified
|
||||||
|
when the operation is completed. These include: SaveContent, SaveToFile,
|
||||||
|
SaveToCSVFile, SaveToStream, and SaveToCSVStream. These actions are triggered
|
||||||
|
by a control in the application, and its OnClick or OnExecute handler can be
|
||||||
|
used to set the value in Modified.
|
||||||
</p>
|
</p>
|
||||||
</descr>
|
</descr>
|
||||||
<seealso>
|
<seealso>
|
||||||
<link id="TCustomStringGrid.Cells"/>
|
<link id="TCustomStringGrid.Cells"/>
|
||||||
|
<link id="TCustomStringGrid.SetCells"/>
|
||||||
</seealso>
|
</seealso>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user