mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-09 15:57:54 +01:00
FPDoc -updates to grids.xml (mostly corrections/improvements to HowTo topic) and DbGrids (mostly links)
git-svn-id: trunk@14627 -
This commit is contained in:
parent
c483b4cea0
commit
4d98ee50b5
@ -91,19 +91,20 @@
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TCustomDbGrid">
|
||||
<short>
|
||||
<i>TCustomDBGrid</i> - the Base class for <i>TDBGrid,</i> a data-aware component for displaying information from a database in the manner of a <i>Stringrid</i>
|
||||
<var>TCustomDBGrid</var> - the Base class for <var>TDBGrid,</var> a data-aware component for displaying information from a database in the manner of a <var>Stringrid</var>
|
||||
</short>
|
||||
<seealso>
|
||||
<link id="#lcl.DBCtrls.HowToUseDataAwareControls"/>
|
||||
<link id="#lcl.DBCtrls.HowToUseDataAwareControls">HowToUseDataAwareControls</link>
|
||||
<link id="#lcl.Grids.HowToUseGrids">HowToUseGrids</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TColumn">
|
||||
<short>
|
||||
<i>TColumn </i>- one of the physical columns of the display in a DataBase Grid</short>
|
||||
<var>TColumn </var>- one of the physical columns of the display in a DataBase Grid</short>
|
||||
<descr>
|
||||
<p>
|
||||
<i>TColumn </i>- one of the physical columns of the display in a DataBase Grid</p>
|
||||
<var>TColumn </var>- one of the physical columns of the display in a DataBase Grid</p>
|
||||
<p>Each column may display the information held in a Field of the DataSet to which the DBGrid is attached, but the order of appearance of the columns need not correspond to the order in which the Fields exist in the DataSet, nor need all Fields be represented by a Column.</p>
|
||||
</descr>
|
||||
<errors/>
|
||||
@ -1982,8 +1983,8 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
<element name="TColumn.Field">
|
||||
<short>The <i>Field </i>in the <i>DataSet</i> that is to be associated with this <i>Column</i>, for display , editinig etc</short>
|
||||
<descr>Refers to the whole entity <i>Field</i>, including contents, name, position in the dataset, properties such as read/write enabling etc
|
||||
<short>The <var>Field </var>in the <var>DataSet</var> that is to be associated with this <var>Column</var>, for display , editinig etc</short>
|
||||
<descr>Refers to the whole entity <var>Field</var>, including contents, name, position in the dataset, properties such as read/write enabling etc
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -2569,10 +2570,11 @@ and Destroys the item instance.
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TCustomDbGrid">
|
||||
<short>
|
||||
<i>TCustomDBGrid </i> - the base class for <i>TDBGrid</i> , for displaying database information in the manner of a <i>StringGrid</i>
|
||||
<var>TCustomDBGrid </var> - the base class for <var>TDBGrid</var> , for displaying database information in the manner of a <var>StringGrid</var>
|
||||
</short>
|
||||
<seealso>
|
||||
<link id="#lcl.DBCtrls.HowToUseDataAwareControls"/>
|
||||
<link id="#lcl.DBCtrls.HowToUseDataAwareControls">HowToUseDataAwareControls</link>
|
||||
<link id="#lcl.Grids.HowToUseGrids">HowToUseGrids</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
@ -3893,7 +3895,8 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- property Visibility: protected -->
|
||||
<element name="TCustomDbGrid.OnColumnMoved">
|
||||
<short/>
|
||||
<short>
|
||||
<var>OnColumnMoved</var> - event handler for moving a column</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -3928,7 +3931,8 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- procedure Visibility: public -->
|
||||
<element name="TCustomDbGrid.DefaultDrawColumnCell">
|
||||
<short/>
|
||||
<short>
|
||||
<var>DefaultDrawColumnCell</var> - the default method for drawing cells in this column</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
@ -4563,19 +4567,23 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- property Visibility: protected -->
|
||||
<element name="TCustomDBGrid.OptionsExtra">
|
||||
<short/>
|
||||
<descr/>
|
||||
<short>
|
||||
<var>OptionsExtra</var> - the extra options for this grid</short>
|
||||
<descr>
|
||||
<var>OptionsExtra</var> - the extra options for this grid: autocolumns and enable checkboxes</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: protected -->
|
||||
<element name="TCustomDBGrid.SelectedRows">
|
||||
<short/>
|
||||
<short>
|
||||
<var>SelectedRows</var> - recorded as a bookmark list</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: protected -->
|
||||
<element name="TCustomDBGrid.OnColumnSized">
|
||||
<short/>
|
||||
<short>
|
||||
<var>OnColumnSized</var> - event handler for re-sizing a column</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -4593,8 +4601,14 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- property Visibility: protected -->
|
||||
<element name="TCustomDBGrid.OnUserCheckboxBitmap">
|
||||
<short/>
|
||||
<descr/>
|
||||
<short>
|
||||
<var>OnUserCheckboxBitmap</var> - event handler: user-defined bitmap for checkboxes</short>
|
||||
<descr>
|
||||
<p>
|
||||
<var>OnUserCheckboxBitmap</var> - event handler: user-defined bitmap for checkboxes</p>
|
||||
<p>The user is encouraged to provide bitmaps to represent the three states for database grid checkboxes: <var>gcbpUnChecked</var>, <var>gcbpChecked</var> and <var>gcbpGrayed</var>
|
||||
</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- procedure Visibility: public -->
|
||||
@ -4606,7 +4620,9 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- function Visibility: public -->
|
||||
<element name="TCustomDBGrid.EditorByStyle">
|
||||
<short/>
|
||||
<short>
|
||||
<var>EditorByStyle</var> - the editor to be used for this grid, specified by <var>Style</var>
|
||||
</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
@ -4621,7 +4637,8 @@ and Destroys the item instance.
|
||||
</element>
|
||||
<!-- procedure Visibility: public -->
|
||||
<element name="TCustomDBGrid.ResetColWidths">
|
||||
<short/>
|
||||
<short>
|
||||
<var>ResetColWidths</var> - restore the column widths to their default values</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
@ -4648,15 +4665,16 @@ and Destroys the item instance.
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TdbGrid">
|
||||
<short>
|
||||
<i>TdbGrid </i> - a data-aware version of <i>TStringGrid,</i> for displaying and operating on a series of Rows and Columns from a database</short>
|
||||
<var>TdbGrid </var> - a data-aware version of <var>TStringGrid,</var> for displaying and operating on a series of Rows and Columns from a database</short>
|
||||
<descr>
|
||||
<p>
|
||||
<i>TdbGrid </i> - a data-aware version of <i>TStringGrid,</i> for displaying and operating on a series of Rows and Columns from a database</p>
|
||||
<var>TdbGrid </var> - a data-aware version of <var>TStringGrid,</var> for displaying and operating on a series of Rows and Columns from a database</p>
|
||||
<p>Inherits many of its properties from <link id="#lcl.Grids.TCustomGrid">TCustomGrid</link> and, of course, from <link id="TCustomDBGrid">TCustomDBGrid</link>
|
||||
</p>
|
||||
</descr>
|
||||
<seealso>
|
||||
<link id="#lcl.DBCtrls.HowToUseDataAwareControls"/>
|
||||
<link id="#lcl.DBCtrls.HowToUseDataAwareControls">HowToUseDataAwareControls</link>
|
||||
<link id="#lcl.Grids.HowToUseGrids">HowToUseGrids</link>
|
||||
</seealso>
|
||||
</element>
|
||||
<!-- property Visibility: public -->
|
||||
@ -4673,7 +4691,7 @@ and that description should be read to understand their definitions more fully.
|
||||
<short>Used to align the control in one of four directions.</short>
|
||||
<descr>
|
||||
<p>// standard properties, which should be supported by all descendants</p>
|
||||
<p>Either reads a flag containing alignment instructions (<i>FAlign</i>) or writes alignment instructions (<i>SetAlign</i>)</p>
|
||||
<p>Either reads a flag containing alignment instructions (<var>FAlign</var>) or writes alignment instructions (<var>SetAlign</var>)</p>
|
||||
<p>May have no alignment, may have custom or client alignment, or can be aligned to top, bottom, left or right</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
@ -4684,7 +4702,7 @@ and that description should be read to understand their definitions more fully.
|
||||
<descr>
|
||||
<p>// standard properties, which should be supported by all descendants</p>
|
||||
<p>Determines how the control is to be anchored to its client or parent conrol</p>
|
||||
<p>Either reads a flag containing the set of anchors to be used, or writes a set of anchors. If they have been written, this is indicated in <i>IsAnchorsStored</i>
|
||||
<p>Either reads a flag containing the set of anchors to be used, or writes a set of anchors. If they have been written, this is indicated in <var>IsAnchorsStored</var>
|
||||
</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
@ -4720,23 +4738,23 @@ and that description should be read to understand their definitions more fully.
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.Columns">
|
||||
<short>Refers to the physical columns of the grid, displaying the contents of the relevant <i>Fields</i>
|
||||
<short>Refers to the physical columns of the grid, displaying the contents of the relevant <var>Fields</var>
|
||||
</short>
|
||||
<descr>
|
||||
<p>Refers to the physical columns of the grid, displaying the contents of the relevant <i>Fields</i>
|
||||
<p>Refers to the physical columns of the grid, displaying the contents of the relevant <var>Fields</var>
|
||||
</p>
|
||||
<p>The <i>Columns</i> property is configurable from the Object Inspector by selecting the ellipsis (...) next to the property name, in which case a pop-up memo box appears to allow editing. It deals with things like the size, shape and format of the display, and contains a link to the appropriate Field. </p>
|
||||
<p>The <var>Columns</var> property is configurable from the Object Inspector by selecting the ellipsis (...) next to the property name, in which case a pop-up memo box appears to allow editing. It deals with things like the size, shape and format of the display, and contains a link to the appropriate Field. </p>
|
||||
<p>Do no confuse Grid columns (in the display) with the SQL usage of COLUMNS, which corresponds to Fields in our environment. The Fields consist of a series of cells arranged in Records, which contain the actual data which are to be displayed and operated upon.</p>
|
||||
<p>It is entirely possible that not all fields of the dataset are displayed, and so fields do not correspond directly to columns; in fact the <i>Columns</i> property allows the user to configure which data field is to be displayed in each column</p>
|
||||
<p>It is entirely possible that not all fields of the dataset are displayed, and so fields do not correspond directly to columns; in fact the <var>Columns</var> property allows the user to configure which data field is to be displayed in each column</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.Constraints">
|
||||
<short>Determine <i>Constraints</i> (max and min height and width) for this control</short>
|
||||
<short>Determine <var>Constraints</var> (max and min height and width) for this control</short>
|
||||
<descr>
|
||||
<p>// standard properties, which should be supported by all descendants</p>
|
||||
<p>Determine <i>Constraints</i> (max and min height and width) for this control; reads the size constraints or stores new ones.</p>
|
||||
<p>Determine <var>Constraints</var> (max and min height and width) for this control; reads the size constraints or stores new ones.</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -4756,17 +4774,17 @@ and that description should be read to understand their definitions more fully.
|
||||
<element name="TdbGrid.DefaultRowHeight">
|
||||
<short>Default value for the height of newly created grid rows.</short>
|
||||
<descr>
|
||||
<p>If new rows of the grid are created by changing the <link id="TCustomGrid.DefaultRowHeight.RowCount">RowCount</link> property, the height of these new rows will be set to the value of the <i>DefaultRowHeight</i> property. </p>
|
||||
<p>If new rows of the grid are created by changing the <link id="TCustomGrid.DefaultRowHeight.RowCount">RowCount</link> property, the height of these new rows will be set to the value of the <var>DefaultRowHeight</var> property. </p>
|
||||
<p>After that the user may redefine this value. If the <link id="TCustomGrid.DefaultRowHeight.Options">Options</link> property includes the appropriate value, the row height may also be changed by the user at runtime.</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.Enabled">
|
||||
<short>Whether the control is <i>Enabled</i>. If not, it usually appears 'greyed-out'</short>
|
||||
<short>Whether the control is <var>Enabled</var>. If not, it usually appears 'greyed-out'</short>
|
||||
<descr>
|
||||
<p>// standard properties, which should be supported by all descendants</p>
|
||||
<p>Whether the control is <i>Enabled</i>. If not, it usually appears 'greyed-out'</p>
|
||||
<p>Whether the control is <var>Enabled</var>. If not, it usually appears 'greyed-out'</p>
|
||||
<p>Reads a flag to see whether the control is enabled, or stores a new value. If stored, sets a flag to say so.</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
@ -4799,14 +4817,14 @@ and that description should be read to understand their definitions more fully.
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.ParentColor">
|
||||
<short>
|
||||
<i>ParentColor</i> - should the control have the same colour as the parent? Default is true</short>
|
||||
<var>ParentColor</var> - should the control have the same colour as the parent? Default is true</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.ParentFont">
|
||||
<short>
|
||||
<i>ParentFont </i>- should the control use the same font as the parent? Default is true</short>
|
||||
<var>ParentFont </var>- should the control use the same font as the parent? Default is true</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -4843,11 +4861,11 @@ Reads flag or writes one to determine if a hint is to be shown when mouse hovers
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.TabStop">
|
||||
<short>
|
||||
<i>TabStop</i> - determines if the user can tab to a control.</short>
|
||||
<var>TabStop</var> - determines if the user can tab to a control.</short>
|
||||
<descr>
|
||||
<p>Reads or writes boolean flag; default is False</p>
|
||||
<p>Use the TabStop to allow or disallow access to the control using the Tab key.</p>
|
||||
<p>If <i>TabStop</i> is True, the control is in the tab order. If <i>TabStop</i> is False, the control is not in the tab order and the user can't use the Tab key to move to the control.</p>
|
||||
<p>If <var>TabStop</var> is True, the control is in the tab order. If <var>TabStop</var> is False, the control is not in the tab order and the user can't use the Tab key to move to the control.</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -4860,7 +4878,7 @@ Reads flag or writes one to determine if a hint is to be shown when mouse hovers
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.Visible">
|
||||
<short>
|
||||
<i>Visible</i> - can the control be seen?</short>
|
||||
<var>Visible</var> - can the control be seen?</short>
|
||||
<descr>
|
||||
<pre>The Visible property represents the ability to see a visual control.
|
||||
If Visible is True the control is shown, otherwise it is hidden.
|
||||
@ -4917,26 +4935,26 @@ Reads flag or writes one to determine if a hint is to be shown when mouse hovers
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.OnEnter">
|
||||
<short>
|
||||
<i>OnEnter</i> - event handler for when the mouse enters the control, and the control receives focus</short>
|
||||
<var>OnEnter</var> - event handler for when the mouse enters the control, and the control receives focus</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.OnExit">
|
||||
<short>
|
||||
<i>OnExit</i> - event handler for when the mouse leaves the control and it loses focus</short>
|
||||
<var>OnExit</var> - event handler for when the mouse leaves the control and it loses focus</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.OnKeyDown">
|
||||
<short>
|
||||
<i>OnKeyDown</i> - event handler for instance when key is down while control has focus</short>
|
||||
<var>OnKeyDown</var> - event handler for instance when key is down while control has focus</short>
|
||||
<descr>
|
||||
<p>
|
||||
<i>OnKeyDown</i>
|
||||
<var>OnKeyDown</var>
|
||||
- event handler for instance when key is down while control has focus</p>
|
||||
<p>Differs from <link id="#lcl.Controls.TWinControl.OnKeyPress">OnKeyPress</link> in that the key may have already been down when the control received focus; with <i>OnKeyPress</i> the key needs to become pressed while the control has focus.</p>
|
||||
<p>Differs from <link id="#lcl.Controls.TWinControl.OnKeyPress">OnKeyPress</link> in that the key may have already been down when the control received focus; with <var>OnKeyPress</var> the key needs to become pressed while the control has focus.</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
@ -4945,19 +4963,19 @@ Reads flag or writes one to determine if a hint is to be shown when mouse hovers
|
||||
<short>OnKeyPress - event controller for a key being pressed while the control has focus</short>
|
||||
<descr>
|
||||
<p>
|
||||
<i>OnKeyPress</i>
|
||||
<var>OnKeyPress</var>
|
||||
- event controller for a key being pressed while the control has focus</p>
|
||||
<p>Differs from <link id="#lcl.Controls.TWinControl.OnKeyDown">OnKeyDown</link> in that the key needs to become pressed while the control has focus; with <i>OnKeyDown</i> the key may have already been down when the control received focus.</p>
|
||||
<p>Differs from <link id="#lcl.Controls.TWinControl.OnKeyDown">OnKeyDown</link> in that the key needs to become pressed while the control has focus; with <var>OnKeyDown</var> the key may have already been down when the control received focus.</p>
|
||||
</descr>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TdbGrid.OnKeyUp">
|
||||
<short>
|
||||
<i>OnKeyUp</i> - event handler for instance when a key is up (not pressed) while the control has focus</short>
|
||||
<var>OnKeyUp</var> - event handler for instance when a key is up (not pressed) while the control has focus</short>
|
||||
<descr>
|
||||
<p>
|
||||
<i>OnKeyUp</i>
|
||||
<var>OnKeyUp</var>
|
||||
- event handler for instance when a key is up (not pressed) while the control has focus</p>
|
||||
<p>The key may already have been up when the control received focus, or a pressed key may become released during the time the control has focus.</p>
|
||||
</descr>
|
||||
@ -5074,14 +5092,14 @@ Reads flag or writes one to determine if a hint is to be shown when mouse hovers
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TDBGrid.DragCursor">
|
||||
<short>
|
||||
<i>DragCursor </i>- the style of cursor to be used during the Drag process</short>
|
||||
<var>DragCursor </var>- the style of cursor to be used during the Drag process</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
<!-- property Visibility: published -->
|
||||
<element name="TDBGrid.DragMode">
|
||||
<short>
|
||||
<i>DragMode </i>- whether manual or automatic</short>
|
||||
<var>DragMode </var>- whether manual or automatic</short>
|
||||
<descr/>
|
||||
<seealso/>
|
||||
</element>
|
||||
|
||||
@ -1442,6 +1442,7 @@ Grids are suitable for showing data that have tabular nature, for example tables
|
||||
<seealso>
|
||||
<link id="TStringGrid"/>
|
||||
<link id="TDrawGrid"/>
|
||||
<link id="HowToUseGrids"/>
|
||||
</seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
@ -4608,7 +4609,7 @@ Application developers may use the OnSelection and OnBeforeSelection events to r
|
||||
<var>TDrawGrid</var> - a drawn grid. May contain images in its cells</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<seealso><link id="HowToUseGrids"/></seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TDrawGrid.FOnColRowDeleted">
|
||||
@ -5429,7 +5430,7 @@ Application developers may use the OnSelection and OnBeforeSelection events to r
|
||||
<var>TStringGrid</var> - a specialised grid for displaying strings (text material) in a matrix of columns and rows</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<seealso><link id="HowToUseGrids"/></seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TStringGrid.FDefEditor">
|
||||
@ -9720,7 +9721,7 @@ Segunda linea de texto</descr>
|
||||
</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<seealso><link id="HowToUseGrids"/></seealso>
|
||||
</element>
|
||||
<!-- variable Visibility: private -->
|
||||
<element name="TCustomDrawGrid.FOnColRowDeleted">
|
||||
@ -10909,7 +10910,7 @@ Segunda linea de texto</descr>
|
||||
</short>
|
||||
<descr/>
|
||||
<errors/>
|
||||
<seealso/>
|
||||
<seealso><link id="HowToUseGrids"/></seealso>
|
||||
</element>
|
||||
<!-- object Visibility: default -->
|
||||
<element name="TStringGridStrings">
|
||||
@ -12161,34 +12162,34 @@ Segunda linea de texto</descr>
|
||||
<descr>
|
||||
<p>How to use <var>Grids</var> including <var>StringGrids</var>, <var>DrawGrids</var> and <var>DbGrids</var></p>
|
||||
<p><b>Customizing grids</b></p>
|
||||
<p>Grid are components derived from the <var>TCustomControl</var> class and don't have a native widget associated with them, so grids are not restricted by the look of the current interface theme. This can be both an advantage and a disadvantage: usually programmers want to create a uniform-look application. Lazarus grids are flexible enough to allow programmers to make grids look similar to other native controls; alternatively they can customize the grid to obtain almost the same look in any platform or widget interface (with the exception of scrollbars, whose look is still determined by the current theme).</p>
|
||||
<p>Grid are components derived from the <var>TCustomControl</var> class and don't have a native widget associated with them, so they are not restricted by the look of the current interface theme. This can be both an advantage and a disadvantage: usually programmers want to create a uniform-look application. Lazarus grids are flexible enough to allow programmers to make them look similar to other native controls; alternatively they can customize the grid to obtain almost the same look in any platform or widget interface (with the exception of scrollbars, whose look is still determined by the current theme).</p>
|
||||
<p>Some properties can affect the way the grid looks by acting when the cell is about to be painted in <var>PrepareCanvas/OnPrepareCanvas</var> by changing default canvas properties like brush color or font. Following is a list of such properties:</p>
|
||||
<table>
|
||||
<caption>Properties and Events for customizing grids</caption>
|
||||
<caption><b>Properties and Events for customizing grids</b></caption>
|
||||
<th>
|
||||
<td>Property</td><td>Meaning</td>
|
||||
</th>
|
||||
<tr>
|
||||
<td>AlternateColor</td><td>With this the user can change the background color appears on alternated rows. This is to allow easy reading of grid rows data.</td></tr>
|
||||
<td>AlternateColor</td><td>The user can change the background color appears on alternated rows. This is to allow easy reading of grid rows data.</td></tr>
|
||||
<tr>
|
||||
<td>Color</td><td>This sets the primary color used to draw non fixed cells background.</td></tr>
|
||||
<td>Color</td><td>Sets the primary color used to draw non fixed cells background.</td></tr>
|
||||
<tr>
|
||||
<td>FixedColor</td><td>This is the color used to draw fixed cells background.</td></tr>
|
||||
<td>FixedColor</td><td>The color used to draw fixed cells background.</td></tr>
|
||||
<tr>
|
||||
<td>Flat</td><td>This eliminates the 3d look of fixed cells.</td></tr>
|
||||
<td>Flat</td><td>Eliminates the 3d look of fixed cells.</td></tr>
|
||||
<tr>
|
||||
<td>TitleFont</td><td>Font used to draw the text in fixed cells.</td></tr>
|
||||
<tr>
|
||||
<td>TitleStyle</td><td>This property changes the 3D look of fixed cells, there are 3 settings:<br/>
|
||||
<var>tsLazarus</var> This is the default look<br/>
|
||||
<var>tsNative</var> This tries to set a look that is in concordance with current widgetset theme.<br/>
|
||||
<var>tsStandard</var> This style has a more contrasted look, like Delphi grids.<br/>
|
||||
<td>TitleStyle</td><td>Changes the 3D look of fixed cells. There are 3 settings:<br/>
|
||||
<var>tsLazarus</var> The default look<br/>
|
||||
<var>tsNative</var> Tries to set a look that is in concordance with current widgetset theme.<br/>
|
||||
<var>tsStandard</var> A more contrasted look, like Delphi grids.<br/>
|
||||
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td>AltColorStartNormal</td><td>(Boolean). If true, alternate color is always in the second row after fixed rows, the first row after fixed rows will be always color. If false, default color is set to the first row as if there were no fixed rows.</td></tr>
|
||||
<td>AltColorStartNormal</td><td>(Boolean). If true, alternate color is always in the second row after fixed rows; the first row after fixed rows will always be the default color. If false, default color is set to the first row as if there were no fixed rows.</td></tr>
|
||||
<tr>
|
||||
<td>BorderColor</td><td>This sets the grid's border color used when <var>Flat</var>:=True and <var>BorderStyle</var>:=bsSingle;</td></tr>
|
||||
<td>BorderColor</td><td>Sets the grid's border color used when <var>Flat</var>=True and <var>BorderStyle</var>=bsSingle;</td></tr>
|
||||
<tr>
|
||||
<td>EditorBorderStyle</td><td>If set to <var>bsNone</var> under Windows the cell editors will not have the border, like in Delphi; set to <var>bsSingle</var> by default because the border can be theme specific in some widgetsets and to allow a uniform look.</td></tr>
|
||||
<tr>
|
||||
@ -12208,19 +12209,19 @@ Segunda linea de texto</descr>
|
||||
<tr>
|
||||
<td>AutoAdvance</td><td>Where the cell cursor will go when pressing enter or tab/shift tab, or after editing.</td></tr>
|
||||
<tr>
|
||||
<td>ExtendedColSizing</td><td>If true, the user can resize columns not just at the headers but anywhere along the column's height.</td></tr>
|
||||
<td>ExtendedColSizing</td><td>If true, the user can resize columns, not just at the headers, but anywhere along the column's height.</td></tr>
|
||||
</table>
|
||||
|
||||
<p>Other properties that also affect the grid's look:</p>
|
||||
<p><var>Options</var>: This property is a set, with some elements that enable diverse functionality but others that are related directly with grid's look. These options can be set at designtime or runtime.</p>
|
||||
<p><var>Options</var>: This property is a set of zero or more choices, with some elements that enable diverse functionality but others that are related directly with grid's look. Options can be set at designtime or runtime.</p>
|
||||
<ul>
|
||||
<li><var>goFixedVertLine, goFixedHorzLine</var>: it draws a vertical or horizontal line respectively delimiting cells or columns in fixed area, active by default.</li>
|
||||
<li><var>goVertLine, goHorzLine</var>: the same as previous, but for normal browseable area. A grid can be made to simulate a listbox by unsetting both of this elements.</li>
|
||||
<li><var>goDrawFocusSelected</var>: if this element is enabled, a selection background is painted in focused the cell in addition to the focused dotted rectangle (note this doesn't work yet when <var>goRowSelect</var> option is set; in such case row is always painted as if <var>goDrawFocusSelected</var> is set)</li>
|
||||
<li><var>goRowSelect</var>: select the full row instead of individual cells</li>
|
||||
<li><var>goFixedVertLine, goFixedHorzLine</var>: draws a vertical or horizontal line respectively, delimiting cells or columns in the fixed area; active by default.</li>
|
||||
<li><var>goVertLine, goHorzLine</var>: the same as previous, but for the normal browseable area. A grid can be made to simulate a listbox by unsetting both of these options.</li>
|
||||
<li><var>goDrawFocusSelected</var>: if this option is enabled, a selection background is painted in the focused cell in addition to the focused dotted rectangle (note this doesn't work yet when the <var>goRowSelect</var> option is set; in such case the row is always painted as if <var>goDrawFocusSelected</var> is set)</li>
|
||||
<li><var>goRowSelect</var>: selects the full row instead of individual cells</li>
|
||||
<li><var>goFixedRowNumbering</var>: if set, grid will do numbering of rows in first fixed column</li>
|
||||
<li><var>goHeaderHotTracking</var>: if set, the grid will try to show a different look when the mouse cursor is overing any fixed cell. In order for this to work, desired cell zone needs to be enabled with property <var>HeaderHotZones</var>. Try combining this option with property <var>TitleStyle</var>=<var>tsNative</var> to get themed hot tracking look.</li>
|
||||
<li><var>goHeaderPushedLook</var>: if set, this element enables a pushed look when clicking any fixed cell. The zone of "pushable" cells is enabled using <var>HeaderPusedZones</var> property.</li>
|
||||
<li><var>goHeaderHotTracking</var>: if set, the grid will try to show a different look when the mouse cursor is overlying any fixed cell. In order for this to work, desired cell zone needs to be enabled with the property <var>HeaderHotZones</var>. Try combining this option with property <var>TitleStyle</var>=<var>tsNative</var> to get themed hot tracking look.</li>
|
||||
<li><var>goHeaderPushedLook</var>: if set, this opton enables a pushed look when clicking any fixed cell. The zone of "pushable" cells is enabled using <var>HeaderPusedZones</var> property.</li>
|
||||
</ul>
|
||||
<p><b>Description of grid's drawing process</b></p>
|
||||
<p>Like other custom controls, the grid is drawn using the paint method. In general terms the grid is drawn by painting all rows, and each row by painting its individual cells.</p>
|
||||
@ -12241,45 +12242,47 @@ Segunda linea de texto</descr>
|
||||
<tr>
|
||||
<td>gdPushed</td><td>the cell is being clicked, paint it with pushed look </td></tr>
|
||||
</table></li>
|
||||
<li><var>DrawCell</var>The DrawCell method is virtual and may be overriden in descendent grids to do custom drawing. The information passed to <var>DrawCell</var> helps to identify the particular cell is being painted, the physical area ocuppied in screen and its visible status. See DrawCell reference for details. For each cell the following occurs:
|
||||
<li><var>DrawCell</var>. The DrawCell method is virtual and may be overriden in descendent grids to do custom drawing. The information passed to <var>DrawCell</var> helps to identify which particular cell is being painted, the physical area occupied on the screen and its visible status. See <link id="TCustomGrid.DrawCell">DrawCell</link> reference for details. For each cell the following occurs:
|
||||
<ul>
|
||||
<li><b>PrepareCanvas.</b> In this method, if the DefaultDrawing property is set, the grid canvas is setup with default properties for brush and font based on current visual state. For several design and runtime properties, the text alignment is set to match programmer selection in custom columns if they exists. If DefaultDrawing is false, brush color is set to clWindow and Font color to clWindowText, the text alignment is set with grids defaultTextStyle property value.</li>
|
||||
<li><b>OnPrepareCanvas.</b> If the programmer wrote an event handler for the <var>OnPrepareCanvas</var> event, it is called at this point. This event can be used for doing simple customization like changing cell's background color, font's properties like color, fontface and style, Text layout like different combinations of left, center, top, bottom, right alignment, etc. Any change made to the canvas in this event would be lost, because the next cell drawing will reset canvas again to a default state. So it's safe doing changes only for particular cell or cells and forget about it for the rest. Using this event sometimes helps to avoid using the <var>OnDrawCell</var> grid event, where users would be forced to duplicate the grid's drawing code. Todo: samples of what can be made and what to leave for OnDrawCell?</li>
|
||||
<li><b>OnDrawCell.</b> Next if no handler for the <var>OnDrawCell</var> event was specified, the grid calls the <var>DefaultDrawCell</var> method which simply paints the cell background using the current canvas brush color and style. If the <var>OnDrawCell</var> handler exists, the grid first paints the cell background but only if the <var>DefaultDrawing</var> property was set, then it calls <var>OnDrawCell</var> event to do custom cell painting. Usually programmers want to do custom drawing only for particular cells, but standard drawing for others; in this case, they can restrict custom operation to certain cell or cells by looking into <var>ACol, ARow</var> and <var>AState</var> arguments, and for other cells simply call the <var>DefaultDrawCell</var> method and let the grid to take care of it.</li>
|
||||
<li><b>Text.</b> At this point (only for <var>TStringGrid</var>) if the <var>DefaultDrawing</var> property is true, the cell's text content is painted.</li>
|
||||
<li><b>Grid lines</b> The last step for each cell is to paint the grid lines: if grid options goVertLine, goHorzLine, goFixedVertLine and goFixedHorzLine are specified the cell grid is drawn at this point. Grids with only rows or only cols can be obtained by changing these options. If the programmer elected to have a "themed" look it is done at this point also (see property TitleStyle).</li>
|
||||
<li><b>PrepareCanvas.</b> If the DefaultDrawing property is set, the grid canvas is setup with default properties for brush and font based on current visual state. For several design and runtime properties, the text alignment is set to match programmer selection in custom columns if they exists. If DefaultDrawing is false, brush color is set to clWindow and Font color to clWindowText, the text alignment is set with grids defaultTextStyle property value.</li>
|
||||
<li><b>OnPrepareCanvas.</b> If the programmer wrote an event handler for the <var>OnPrepareCanvas</var> event, it is called at this point. This event can be used for doing simple customization like changing a cell's background color, font's properties like color, fontface and style, Text layout like different combinations of left, center, top, bottom, right alignment, etc. Any change made to the canvas fo a particular cell in this event would be lost, because the next cell drawing will reset canvas again to a default state. So it's safe doing changes only for particular cell or cells and forget about it for the rest. Using this event sometimes helps to avoid using the <var>OnDrawCell</var> grid event, where users would be forced to duplicate the grid's drawing code. Todo: samples of what can be made and what to leave for OnDrawCell?</li>
|
||||
<li><b>OnDrawCell.</b> Next, if no handler for the <var>OnDrawCell</var> event was specified, the grid calls the <var>DefaultDrawCell</var> method which simply paints the cell background using the current canvas brush color and style. <br/>
|
||||
If the <var>OnDrawCell</var> handler exists, the grid first paints the cell background, but only if the <var>DefaultDrawing</var> property was set; then it calls the <var>OnDrawCell</var> event to do custom cell painting. <br/>
|
||||
Usually programmers want to do custom drawing only for particular cells, but standard drawing for others: in this case, they can restrict custom operation to certain cell or cells by looking into <var>ACol, ARow</var> and <var>AState</var> arguments, and for other cells simply call the <var>DefaultDrawCell</var> method and let the grid to take care of it.</li>
|
||||
<li><b>Text.</b> At this point, if the <var>DefaultDrawing</var> property is true, the cell's text content is painted (only for <var>TStringGrid</var>) .</li>
|
||||
<li><b>Grid lines</b> The last step for each cell is to paint the grid lines: if grid options <var>goVertLine, goHorzLine, goFixedVertLine</var> and <var>goFixedHorzLine</var> are specified the cell grid is drawn at this point. Grids with only rows or only cols can be obtained by changing these options. If the programmer elected to have a "themed" look it is done at this point also (see property TitleStyle).</li>
|
||||
<li><b>FocusRect</b> When all columns of the current row have been painted it is time to draw the focus rectangle for the current selected cell or for the whole row if the <var>goRowSelect</var> option is set.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p><b>Grid's cell selection</b></p>
|
||||
<p>The location of a grid's current (focused) cell (or row) can be changed using keyboard, mouse or through code. In order to change cell focus successfully to another position, we must test the target position to see if it is allowed to receive cell focus. When using keyboard, the property <var>AutoAdvance</var> performs part of the process by finding what should be the next focused cell. When using mouse clicks or moving by code, focus will not move from the current cell unless the target cell is permitted to receive focus.</p>
|
||||
<p>The grid calls function <var>SelectCell</var> to see if a cell is focusable: if this function returns true, then the target cell identified with arguments <var>aCol</var> and <var>aRow</var> is focusable (the current implementation of <var>TCustomGrid</var> simply returns true). <var>TCustomDrawGrid</var> and hence <var>TDrawGrid</var> and <var>TStringGrid</var> override this method to check first if cell is any wider than 0; normally you don't want a 0 width cell selected so a cell with this characteristics is skipped automatically in the process of finding a suitable cell. The other thing the overriden method <var>SelectCell</var> does is to call the user configurable event <var>OnSelectCell</var>: this event receives the cell coordinates as arguments and always returns a default result value of true.</p>
|
||||
<p>Once a cell is known to be focusable and we are sure a movement will take place, first the method <var>BeforeMoveSelection</var> is called; this in turns triggers the <var>OnBeforeSelection</var> event. This method's arguments are the coordinates for the new focused cell, at this point any visible editor is hidden too. The "before" word means that selection is not yet changed and current focused coordinates can be accessed with <var>grid.Col</var> and <var>grid.Row</var> properties. </p>
|
||||
<p>After that, the internal focused cell coordinates are changed and then method <var>MoveSelection</var> is called; this method's purpose is to trigger the <var>OnSelection</var> event if set (this is a notification that the focused cell has, by this time, already changed and cell coordinates are now available through grid.row and grid.col properties).</p>
|
||||
<p>Note that is not good to use <var>OnSelectCell</var> event to detect cell focus changes, as this event will be triggered several times even for the same cell in the process of finding a suitable cell. Is better to use <var>OnBeforeSelection</var> or <var>OnSelection</var> events for this purpose.</p>
|
||||
<p>The location of a grid's current (focused) cell (or row) can be changed using keyboard, mouse or through code. In order to change cell focus successfully to another position, we must test the target position to see if it is allowed to receive cell focus. When using the keyboard, <var>AutoAdvance</var> performs part of the process by finding what should be the next focused cell. When using mouse clicks or moving by code, focus will not move from the current cell unless the target cell is permitted to receive focus.</p>
|
||||
<p>The grid calls <var>SelectCell</var> to see if a cell is focusable: if this function returns true, then the target cell identified with arguments <var>aCol</var> and <var>aRow</var> is focusable (the current implementation of <var>TCustomGrid</var> simply returns true). <var>TCustomDrawGrid</var> and hence <var>TDrawGrid</var> and <var>TStringGrid</var> override this method and check first if a cell is any wider than 0; normally you don't want a 0 width cell selected so a cell with this characteristics is skipped automatically in the process of finding a suitable cell. The the overriden method <var>SelectCell</var> also calls the user configurable event <var>OnSelectCell</var>: this event receives the cell coordinates as arguments and always returns a default result of True.</p>
|
||||
<p>Once a cell is known to be focusable and we are sure a movement will take place, the method <var>BeforeMoveSelection</var> is called; this in turns triggers the <var>OnBeforeSelection</var> event. This method's arguments are the coordinates for the new focused cell; at this point any visible editor is hidden too. The "before" word means that selection is not yet changed and current focused coordinates can be accessed with <var>grid.Col</var> and <var>grid.Row</var> properties. </p>
|
||||
<p>After that, the internal focused cell coordinates are changed and <var>MoveSelection</var> is called; this method's purpose (if set) is to trigger the <var>OnSelection</var> event (this is a notification that the focused cell has changed and the new cell coordinates are available through grid.row and grid.col properties).</p>
|
||||
<p>Note that is not good to use the <var>OnSelectCell</var> event to detect cell focus changes, as this event will be triggered several times even for the same cell in the process of finding a suitable cell. Is better to use <var>OnBeforeSelection</var> or <var>OnSelection</var> events for this purpose.</p>
|
||||
<p><b>Using cell editors</b></p>
|
||||
<p>Users can specify what editor will be used for a cell using one of two methods.</p>
|
||||
<ol>
|
||||
<li><b>Using a custom column and selecting the ButtonStyle property of the column.</b> In this method the user can select the style of the editor that will be shown. Available values are: <var>cbsAuto, cbsEllipsis, cbsNone, cbsPickList, cbsCheckboxColumn</var>.</li>
|
||||
<li><b>Using OnSelectEditor grid event</b>. Here the user specifies in the <var>Editor</var> parameter which editor to use for a cell identified for column <var>aCol</var> and row <var>ARow</var> in a <var>TCustomDrawGrid</var> derived grid or <var>TColumn</var> in <var>TCustomDBGrid</var>. For this purpose there is a useful public function of grids, <var>EditorByStyle()</var> that takes as parameter one of the following values: <var>cbsAuto, cbsEllipsis, cbsNone, cbsPickList, cbsCheckboxColumn</var>. This method takes precedence over the first one using custom columns. A Custom cell editor can be specified here. This event is also the place to setup the editor with values specific to the cell, row or column.</li>
|
||||
<li><b>Using the OnSelectEditor grid event</b>. Here the user specifies in the <var>Editor</var> parameter which editor to use for a cell identified by <var>aCol</var>, <var>ARow</var> in a <var>TCustomDrawGrid</var> derived grid or <var>TColumn</var> in <var>TCustomDBGrid</var>. The public <var>EditorByStyle()</var> function takes as parameter one of the following values: <var>cbsAuto, cbsEllipsis, cbsNone, cbsPickList, cbsCheckboxColumn</var>. <br/>
|
||||
This method takes precedence over the first one using custom columns. A Custom cell editor can be specified here, with values specific to the cell, row or column.</li>
|
||||
</ol>
|
||||
<p><b>Description of editor styles</b></p>
|
||||
<p>The following is a description of the editor styles. They are enumerated values of type <var>TColumnButtonStyle</var> and so they are prefixed by 'cbs'. This type was used to remain compatible with Delphi's <var>DBGrid</var>.</p>
|
||||
<ul>
|
||||
<li><b>cbsAuto</b> This is the default editor style for TCustomGrid derived grids. The actual editor class that will be used to edit the cell content depends on several factors. For TCustomGrids it uses a TStringCellEditor class derived from TCustomMaskEdit. This editor is specialized to edit single line strings. It is then used in TStringGrid and TDrawGrid by default. When using Custom Columns, if the programmer filled the Column's PickList property, this behaves as if cbsPickList editor style was set. For a TCustomDBGrid that has a field of type boolean, it behaves as if cbsCheckBoxColumn editor style was specified. This is the recommended value for Custom Cell Editors. TODO: related OnEditingDone.</li>
|
||||
<li><b>cbsEllipsis</b> This editor style is the most generic one. When used, a button appears in the editing cell and programmers could use the OnEditButtonClick grid event to detect when the user has pressed the button and take any action programmed for such a cell. For example a programmer could use this editor style to pop up a calendar dialog to allow the user easily to select a specific date. Other possibilities could be to show a file open dialog to find files, a calculator so user can enter the numeric result of calcs, etc.<br/>
|
||||
<li><b>cbsAuto</b> This is the default editor style for TCustomGrid derived grids. The TStringCellEditor derived from TCustomMaskEdit is specialized to edit single line strings and is used by default in TStringGrid and TDrawGrid. When using Custom Columns, if the programmer filled the Column's PickList property, this behaves as if cbsPickList editor style was set. For a TCustomDBGrid that has a field of type boolean, it behaves as if cbsCheckBoxColumn editor style was specified. This is the recommended value for Custom Cell Editors. TODO: related OnEditingDone.</li>
|
||||
<li><b>cbsEllipsis</b> This editor style is the most generic one. A button with ellipsis (...) appears in the editing cell and the programmer can use the OnEditButtonClick grid event to take any programmed action when the user presses the button. For example a calendar dialog could pop up to allow the user to select a specific date, a file open dialog could appear to find files, or a calculator could appear so the user could enter the numeric result of calculations, etc.<br/>
|
||||
OnEditButtonClick is just a notification, to find out in which cell a button has been clicked by taking a look at the grid.Row and grid.Col properties.<br/>
|
||||
A DBGrid has specific properties to retrieve the active column or field and because this event occurs in the active record, it could update the information in the active field.<br/>
|
||||
This editor style is implemented using TButtonCellEditor, a direct descendant of TButton.</li>
|
||||
<li><b>cbsNone</b> This editor style instructs the grid not to use any editor for a specific cell or column; it behaves then, as if the grid were readonly for such a cell or column.</li>
|
||||
<li><b>cbsPickList</b> Used to present the user with a list of values that can be entered. This editor style is implemented using TPickListCellEditor, a component derived from TCustomComboBox. The list of values that are shown is filled in one of two ways depending on the method used to select the editor style.<br/>
|
||||
When using custom columns, programmers can enter a list of values using the column's PickList property. [FOR BEGINNERS: TODO: exact procedure to edit the list]</li>
|
||||
<li><b>cbsCheckboxColumn</b> This editor style is at the moment only available in TDBGrid. It can be useful when field contents associated with the column are restricted to a pair of values, for example, yes-no, true-false, on-off, 1-0, etc. Instead of forcing the user to type the values for this kind of field in a StringCellEditor or to choose one from a list, cbsCheckboxColumn is used to modify the field content of a column by using a checkbox representation that the user can toggle by using a mouse click or pressing the SPACE key.<br/>
|
||||
<li><b>cbsCheckboxColumn</b> This editor style is at the moment only available in TDBGrid. If a field's contents associated with the column are restricted to a pair of values, for example, yes-no, true-false, on-off, 1-0, etc then cbsCheckboxColumn is used to modify the apearance of a column by using a checkbox representation that the user can toggle by using a mouse click or pressing the SPACE key.<br/>
|
||||
If a columns' ButtonStyle property is set to cbsAuto and DBGrid detects that the field associated with the column is a boolean field, then the grid uses this editor style automatically. This automatic selection can be disabled or enabled using DBGrid's OptionsExtra property; setting dgeCheckboxColumn element to false disables this feature.<br/>
|
||||
The values that are used to recognize the checked or unchecked states are set in a column's properties ValueChecked and ValueUnchecked.<br/>
|
||||
At any moment, the field value can be in one to three states: Unchecked, Checked or Grayed. Internally these states are identified by the following values of type TDBGridCheckBoxState: gcbpUnChecked, gcbpChecked and gcbpGrayed.<br/>
|
||||
This editor style doesn't use real TCheckbox components to handle user interaction: the visual representation is given by three builtin bitmap images that corresponds to the possible states of checkbox. The used bitmaps can be customized by writing a handler for DBGrid event OnUserCheckboxBitmap; the handler of this event gets the state of the checkbox in the parameter CheckedState of type TDBGridCheckboxState and a bitmap parameter that the programmer could use to specify custom bitmaps.</li>
|
||||
At any moment, the field value can be in one to three states: Unchecked, Checked or Grayed.</li>
|
||||
|
||||
</ul>
|
||||
</descr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user