CustomGrid¶
Qualified name: delphifmx.CustomGrid
- class CustomGrid¶
Bases:
CustomPresentedScrollBoxMethods
TStyledControl.ApplyStyleLookup() Gets and applies the style of a TStyledControl.
Performs any necessary actions before the first destructor is called.
Determines whether the selected cell can be edited (True) or not (False) based on the current configuration of the corresponding column and the grid.
TCustomGrid.CellByPoint(X: float, Y: float, ACol: int, ARow: int) -> bool Fills ACol and ARow with the column and row numbers that identify the cell located at the specified X and Y coordinates, and returns True on success or False otherwise.
TCustomGrid.CellRect(ACol: int, ARow: int) -> Rect Returns the coordinates of the cell at the specified row and column.
Removes and destroys all columns.
TCustomGrid.ColumnByIndex(Idx: int) -> Column Returns the column with the given index.
TCustomGrid.ColumnByPoint(X: float, Y: float) -> Column Returns the column at the given left and top coordinates.
TCustomGrid.DisplayCells(TopLeft: GridModel.TCoord, BottomRight: GridModel.TCoord) -> bool Determines the cells that are visible, either completely or partially, fills TopLeft with the coordinates of the top-left visible cell, fills BottomRight with the coordinates of the bottom-right visible cell, and returns True on success or False otherwise.
Embarcadero Technologies does not currently have any additional information.
TStyledControl.Inflate() Call this procedure to get and apply its style lookup.
TStyledControl.NeedStyleLookup() Call this procedure to indicate that this control requires to get and apply its style lookup.
TCustomGrid.RowByPoint(X: float, Y: float) -> int Returns the index of row at the given left and top coordinates.
Changes the viewport position so that the selected cell is visible.
TCustomGrid.SelectCell(Col: int, Row: int) -> None Selects the cell with the specified index of column and rows.
TCustomGrid.SelectColumn(Value: int) -> None Selects the cell with the specified column index and old row index.
TCustomGrid.SelectRow(Value: int) -> None Selects the cell with the specified row index and old column index.
TCustomGrid.SetTopLeft(ACol: int, ARow: int) -> None Changes the viewport position so that the cell at the specified column number and row number is located on the top-left corner.
TCustomGrid.TextWidthToColWidth(ATextLength: int, ACaption: str) -> float Embarcadero Technologies does not currently have any additional information.
Unloads the previously-loaded presentation of your control.
Attributes
AbsoluteClipRectSpecifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabledSpecifies whether the control is absolutely enabled.
AbsoluteHeightSpecifies the absolute height of the control.
AbsoluteMatrixSpecifies the absolute transformation matrix of the control.
AbsoluteOpacitySpecifies the absolute opacity of the control.
AbsoluteRectSpecifies the absolute rectangle that bounds the control.
AbsoluteScaleSpecifies the absolute scale of the control.
AbsoluteWidthSpecifies the absolute width of the control.
ActionClientSpecifies whether the component object has an associated action.
Updates the width and height of this control according to its current style
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
AlignSpecifies the alignment options (top, left, client, and so on) of this control.
Specifies how the control is anchored to its parent.
Returns the instance to the class that provides scrolling physics calculations.
ApplyingEffectA flag that signals when a control is in the process of applying an effect.
AutoCalculateContentSizeIndicates that the size of the scrolling content is calculated automatically according to the size of the components in content.
AutoCaptureSpecifies whether the control captures mouse events.
AutoHideDefines that scrollbars hide automatically when you scroll.
Specifies whether the control's text should be translated
AxisAlignedRectA TRectF defined by the width and height of the control.
Embarcadero Technologies does not currently have any additional information.
BouncesIndicates if it is possible to scroll content abroad.
BoundsRectSpecifies the bounding rectangle of the control.
Specifies whether the current control can receive focus.
CanParentFocusSpecifies whether the parent of this control should be evaluated to receive focus.
CanvasProvides the drawing surface of the control.
ChildrenStores an array of children attached to this parent component.
ChildrenCountRead-only property that specifies the number of children in the children list.
ChildrenRectSpecifies the bigger rectangle area occupied by parent and children controls.
ClassNameReturns the TObject.ClassName
ClipChildrenSpecifies if children of the control should be clipped to the control's on-screen region.
ClipParentSpecifies whether the current control has clipped its parent.
ClipRectSpecifies the bound rectangle to be clipped.
The column number of the selected cell, or -1 if there is no cell selected.
Specifies the number of columns in the grid.
Specifies the index of the column that contains the selected cell.
Column:
ComObjectSpecifies the interface reference implemented by the component.
ComponentCountReturns the owned component count
ComponentIndexIndicates the position of the component in its owner's Components property array.
ComponentStateDescribes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyleGoverns the behavior of the component.
ComponentsReturns an iterator over the owned components
ContentContainer that can hold scrollable content of the scroll box.
ContentBoundsThe content bounds.
ContentLayoutReturns the control from style that will wrap its scrolling content.
ContentSizeCurrent content size.
ControlTypeControlType:
ControlsReturns an iterator over contained controls
ControlsCountReturns the count of contained controls
CursorImage to use to represent the mouse pointer when it passes into the region covered by the control.
DataStores a Tvalue, which is a data structure that can store different kinds of data types.
Determines whether cells are drawn using the default drawing method (True) or using a user-defined drawing method (False).
DefaultSizeEmbarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
DesignInfoContains information used by the Form designer.
DisableDisappearEmbarcadero Technologies does not currently have any additional information.
DisableFocusEffectSpecifies whether the control has the focus effect disabled.
DisableMouseWheelDefines that the control does not have reaction to Mouse-Wheel event.
DragModeSpecifies how the control initiates drag-and-drop operations.
Determines whether the grid control is in the edit mode (True) or not (False).
EnableDragHighlightSpecifies whether the control is highlighted when the dragged object is over it.
Specifies whether the control responds to mouse, keyboard, and timer events.
EnabledScrollEnables or disables scrolling.
FixedSizeEmbarcadero Technologies does not currently have any additional information.
HScrollBarReturns the horizontal scrollbar component.
HasAfterPaintEffectSpecifies whether the control has an effect that is applied after the control is painted.
HasClipParentControl that is a direct child of this control and has clipped this control.
HasDisablePaintEffectSpecifies whether the control's effect is painted.
HasEffectSpecifies whether the control has an applied effect.
HeightHeight specifies the vertical size of the control (in dp).
HelpContextContains the numeric context ID that identifies the Help topic for the control.
HelpKeywordContains the keyword string that identifies the Help topic for the control.
HelpTypeSpecifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
HintSpecifies the text string that appears when the user moves the mouse over a control.
HitTestEnables the control to capture mouse events.
Specifies the list of images associated with this grid control.
InPaintToSpecifies whether the control is currently being painted.
IndexSpecifies the index of the child object in the children array attached to this object.
InheritedCursorImage used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrixSpecifies the inverse matrix of AbsoluteMatrix.
IsDragOverSpecifies whether a dragged object is over the area of the current control.
IsFocusedDetermines whether the control has input focus.
IsInflatedWhether the current style of this control has been actually applied to the control.
IsMouseOverSpecifies whether the mouse cursor is over the control.
This property is set by the LiveBinding.
IsVisibleSpecifies whether the control is visible.
Number of the first column that is visible, either completely or partially, from the left-hand side of the grid.
LocalRectSpecifies the local rectangle for painting the control.
LockedSpecifies whether the control is locked at design time.
MarginsAligns the component to the margins points of other components.
The data model representing the data used by the presentation of the current control.
NameSpecifies the name of the component as referenced in code.
ObserversIndicates the TObservers object added to the TComponent.
OnGestureCallable[[Object, GestureEventInfo, bool], None]:
OpacitySpecifies the control opacity.
Defines how grid controls look like and how they behave.
OwnerReturns the Component Owner
PaddingAligns the component to the padding points of other components.
ParentReturns/Sets the Control Visibility
ParentClassStyleLookupNameThe name of the default style of the parent class of this control.
ParentControlSpecifies the parent control of this control.
ParentedRectSpecifies the bounding rectangle of the control within its parent.
ParentedVisibleSpecifies whether all the control's parents are visible.
PopupMenuSpecifies the context (pop-up) menu object.
PositionReturns an access to the position of the control inside its parent
PresentationObject:
PresentationProxyPresentationProxy:
PresentationStatePresentationState:
PressedIndicates whether the control is currently pressed.
PressedPositionA point that indicates where exactly on the control the click occured.
Specifies whether the cells in this grid can be modified or not.
Number of the first column that is visible, either completely or partially, from the right-hand side of the grid.
RootSpecifies the root parent of this object.
Number of the selected row.
Specifies the number of rows in the grid.
Specifies the height of each row of this grid, in pixels.
SceneSpecifies the current scene in which the control is drawn.
ScrollAnimationEnables or disables scrolling animation.
ScrollDirectionsDefines the available scroll directions.
Specifies the row where you are currently positioned within the grid.
ShowHintSpecifies whether the Hint can be shown.
ShowScrollBarsDefines scrollbars visibility.
ShowSizeGripShows a small control in the right-bottom corner that represents the size of the changing control.
SizeSpecifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
StoredSpecifies whether this object is stored in the .XFM file.
Specifies the name of the resource object to which the current TStyledControl is linked
StyleNameSpecifies the style name for this FMX component.
This property allows you to define the current state of style
Defines the set of styled text representation properties whose values are loaded from the current style and cannot be changed manually.
StylesDataValue:
TabOrderIndicates the position of the control in its parent's tab order.
TabStopEmbarcadero Technologies does not currently have any additional information.
TagStores a NativeInt integral value as a part of a component.
TagFloatCustom property that stores any floating-point value.
TagObjectCustom property that stores any object value.
TagStringCustom property that stores any string value.
Keeps the values of styled text representation properties that are set in the Object Inspector or programmatically.
Specifies the index of the first visible scrollable row in the grid.
TouchSpecifies the touch manager component associated with the control.
TouchTargetExpansionSet of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
TouchTrackingDefines if the control reacts to touch events.
UpdateRectSpecifies the rectangle area of the control that needs to be updated.
VCLComObjectRepresents information used internally by components that support COM.
VScrollBarReturns the vertical scrollbar component.
ViewportPositionPosition of the view port of the ScrollBox content.
ViewportSizeSize of the view port of the ScrollBox content.
Specifies whether the component appears onscreen.
Embarcadero Technologies does not currently have any additional information.
Indicates the number of scrollable rows that are visible in the grid.
WidthSpecifies the horizontal size of the control (in pixels).
- AdjustSizeValue¶
Updates the width and height of this control according to its current style
- AdjustType¶
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
- Anchors¶
Specifies how the control is anchored to its parent. Use Anchors to ensure that a control maintains its current position relative to the edges of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. Anchors is enforced only when the parent control is resized. If a control is anchored to opposite edges at the same time, the control stretches horizontally or vertically to maintain constant the distance between the control edges and parent edges. If a control is anchored to all four edges of its parent, the control stretches in all directions. By default, a control is anchored to the top and left edges of its container (Anchors=[akTop,akLeft]). The automatic alignment may affect the anchors of a control. When Align is set to None, all the anchors are available. If Align is not None, the anchors affected by the automatic alignment are excluded. Changing the state of the anchors affected by the automatic alignment has no effect over the control. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
Anchors
- AniCalculations¶
Returns the instance to the class that provides scrolling physics calculations. AniCalculations is only available for style presentation. For native presentation, it returns null/nil.
- Type:
AniCalculations
- ApplyStyleLookup()¶
Gets and applies the style of a TStyledControl.
- AutoTranslate¶
Specifies whether the control’s text should be translated
- BeforeDestruction()¶
Performs any necessary actions before the first destructor is called. Performs any necessary actions before the first destructor is called. FMX.Grid.TCustomGrid.BeforeDestruction inherits from System.Classes.TComponent.BeforeDestruction. All content below this line refers to System.Classes.TComponent.BeforeDestruction. Performs any necessary actions before the first destructor is called. BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications. As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.
- BottomRow¶
Embarcadero Technologies does not currently have any additional information.
- Type:
int
- CanEdit()¶
Determines whether the selected cell can be edited (True) or not (False) based on the current configuration of the corresponding column and the grid.
- CanFocus¶
Specifies whether the current control can receive focus. CanFocus is True if it can receive focus, and False otherwise. If it is set to False, the control cannot be selected when using the TAB key. A control can receive focus after it is created.
- Type:
bool
- CellByPoint(X: float, Y: float, ACol: int, ARow: int) bool¶
Fills ACol and ARow with the column and row numbers that identify the cell located at the specified X and Y coordinates, and returns True on success or False otherwise.
- CellRect(ACol: int, ARow: int) Rect¶
Returns the coordinates of the cell at the specified row and column. ACol and ARow are 0-based. You can specify values equal to ColumnCount or RowCount to get the coordinates of an non-existent cell that is next to an existing cell. If the specified column or row numbers are not valid, CellRect returns coordinates (-1, -1, -1, -1).
- ClearColumns()¶
Removes and destroys all columns.
- Col¶
The column number of the selected cell, or -1 if there is no cell selected.
- Type:
int
- ColumnByIndex(Idx: int) Column¶
Returns the column with the given index. If the column does not exist, ColumnByIndex returns nil.
- ColumnByPoint(X: float, Y: float) Column¶
Returns the column at the given left and top coordinates. If the column does not exist, ColumnByPoint returns nil.
- ColumnCount¶
Specifies the number of columns in the grid. Read ColumnCount to determine the number of entries in the Columns array.
- Type:
int
- ColumnIndex¶
Specifies the index of the column that contains the selected cell. Use ColumnIndex at run time to determine the current column in the grid. Setting ColumnIndex moves the focus to the cell in the current row that is in the new column. The first column has an index of 0, the second column has an index of 1, and so on.
- Type:
int
- Columns¶
Column:
- DefaultDrawing¶
Determines whether cells are drawn using the default drawing method (True) or using a user-defined drawing method (False).
- Type:
bool
- DefaultStyleLookupName¶
Returns a string with the name of the default style of this control
- DisplayCells(TopLeft: GridModel.TCoord, BottomRight: GridModel.TCoord) bool¶
Determines the cells that are visible, either completely or partially, fills TopLeft with the coordinates of the top-left visible cell, fills BottomRight with the coordinates of the bottom-right visible cell, and returns True on success or False otherwise.
- EditorMode¶
Determines whether the grid control is in the edit mode (True) or not (False).
- Type:
bool
- Enabled¶
Specifies whether the control responds to mouse, keyboard, and timer events. Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. To re-enable a control, set Enabled to True. This property applies to all TControl descendants.
- Type:
bool
- GetUnusedViewportWidth()¶
Embarcadero Technologies does not currently have any additional information.
- Images¶
Specifies the list of images associated with this grid control. Images from the Images collection can be shown in cells of the TGlyphColumn type column.
- Type:
CustomImageList
- Inflate()¶
Call this procedure to get and apply its style lookup.
- IsUsedInBinding¶
This property is set by the LiveBinding. If this property is True, you cannot change the OnSetValue and the OnCallbackGetValue.
- Type:
bool
- LeftColumn¶
Number of the first column that is visible, either completely or partially, from the left-hand side of the grid.
- Type:
int
- Model¶
The data model representing the data used by the presentation of the current control. The constructor of your presented control creates a data model for your presented control. The class of the data model is the class that DefineModelClass returns.
- Type:
GridModel
- NeedStyleLookup()¶
Call this procedure to indicate that this control requires to get and apply its style lookup.
- Options¶
Defines how grid controls look like and how they behave.
- Type:
GridOptions
- ReadOnly¶
Specifies whether the cells in this grid can be modified or not. Use ReadOnly at run time to determine whether the cells in this grid can be edited. If ReadOnly is True, then you can only read and view the contents of the cells without the ability to affect the grid in any way.
- Type:
bool
- RightColumn¶
Number of the first column that is visible, either completely or partially, from the right-hand side of the grid.
- Type:
int
- Row¶
Number of the selected row.
- Type:
int
- RowByPoint(X: float, Y: float) int¶
Returns the index of row at the given left and top coordinates. If the row does not exist, RowByPoint returns -1, otherwise a positive numerical value is returned. Keep in mind that 0 is the first row, 1 is the second row, and so on.
- RowCount¶
Specifies the number of rows in the grid. The value of RowCount includes the scrollable rows in the grid, but not the fixed row with the headers.
Read RowCount to determine the number of rows in the grid. Set RowCount to add or delete rows at the bottom of the grid.
- Type:
int
- RowHeight¶
Specifies the height of each row of this grid, in pixels. Read RowHeight to determine the size of each row in the grid. If the underlying grid is too tall to appear in the control, then the user must scroll to see the entire content of the grid.
- Type:
float
- ScrollToSelectedCell()¶
Changes the viewport position so that the selected cell is visible.
- SelectCell(Col: int, Row: int) None¶
Selects the cell with the specified index of column and rows. The DoSelectCell method occurs before the change and the DoSelChanged method occurs after the change.
- SelectColumn(Value: int) None¶
Selects the cell with the specified column index and old row index.
- SelectRow(Value: int) None¶
Selects the cell with the specified row index and old column index.
- Selected¶
Specifies the row where you are currently positioned within the grid. Set the Selected property to any positive numerical value to make the specific row selected. Read Selected to obtain the index of the row where you are currently positioned within the grid. The first row has an index of 0, the second one has an index of 1, and so on.
- Type:
int
- SetTopLeft(ACol: int, ARow: int) None¶
Changes the viewport position so that the cell at the specified column number and row number is located on the top-left corner.
- StyleLookup¶
Specifies the name of the resource object to which the current TStyledControl is linked
- StyleState¶
This property allows you to define the current state of style
- StyledSettings¶
Defines the set of styled text representation properties whose values are loaded from the current style and cannot be changed manually. Text representation properties are used as parameters for drawing texts in controls. The StyledSettings property is used in FMX controls such as TButton, TSpeedButton, TCheckBox, and others. Styles, for example Metropolis UI styles, define the default values of the text representation properties like font name, font size, word-wrapping, and others. The TTextSettings class define properties keeping values of the FontColor, TextAlign, VertTextAlign, Trimming, WordWrap, and Font (TFont.Family, TFont.Size, TFont.Style) elements defining visual parameters of a text representation. StyledSettings can contain the Family, Size, Style, FontColor, and Other values defined in TStyledSetting. The “Relation between TStyledSetting constants and TTextSettings properties” table shows which of the TStyledSetting constants control the handling of these TTextSettings text representation properties. Keep in mind that the values of all styled text representation properties listed in the StyledSettings are taken from a style and cannot be changed manually. For example, if you set a new value of the FontColor property of a TTextControl control, then the real updating of the font color takes place only if the StyledSettings property of this control does not contain TStyledSetting.FontColor. For more details, see the example in Setting Text Parameters in FireMonkey. To switch OFF a font property for a control, select the control in the Form Designer. In the Object Inspector, expand the StyledSettings property. Clear the check mark before the property. For example, the following figure shows a TButton control with Size turned OFF (for Button1) and ON (for Button2):
With StyledSettings you can also use the DefaultStyledSettings constant that defines the values of the styled properties that are taken from a style by default. Remember that the HorzAlign and VertAlign text representation properties stored in the TextSettings property of a control correspond to the TextAlign and VertTextAlign properties of the control.
- Type:
StyledSettings
- TextSettings¶
Keeps the values of styled text representation properties that are set in the Object Inspector or programmatically. TextSettings references a TTextSettings type object that handles values of styled text representation properties that are set in the Object Inspector or programmatically. TextSettings references a TTextSettings type object, which handles styled text representation properties to be used for drawing texts in this control. TTextSettings type objects provide all styled text representation properties and methods to manage them. The styled text representation properties are FontColor, TextAlign, VertTextAlign, Trimming, WordWrap, and Font (TFont.Family, TFont.Size, and TFont.Style). TTextSettings objects provide both styled text representation properties, whose values are loaded from a style (specified in StyledSettings), so all other styled text representation properties, whose values can be set manually, and methods to manage these text representation properties. The text representation properties identified in StyledSettings are loaded from the style and cannot be set manually. Remember that the HorzAlign and VertAlign text representation properties stored in the TextSettings property of a control correspond to the TextAlign and VertTextAlign properties of the control.
- Type:
TextSettings
- TextWidthToColWidth(ATextLength: int, ACaption: str) float¶
Embarcadero Technologies does not currently have any additional information.
- TopRow¶
Specifies the index of the first visible scrollable row in the grid. Read TopRow to determine the index of the first row in the scrollable region that is visible. Set TopRow to scroll the rows in the grid so that the row with the TopRow index is the first row after the fixed rows.
- Type:
int
- UnloadPresentation()¶
Unloads the previously-loaded presentation of your control. FMX.Grid.TCustomGrid.UnloadPresentation inherits from FMX.Controls.Presentation.TPresentedControl.UnloadPresentation. All content below this line refers to FMX.Controls.Presentation.TPresentedControl.UnloadPresentation. Unloads the previously-loaded presentation of your control.
See Also
FMX.Controls.Presentation.TPresentedControl.LoadPresentation FMX.Controls.Presentation.TPresentedControl.ReloadPresentation
- Visible¶
Specifies whether the component appears onscreen. Use the Visible property to control the visibility of the control at run time. If Visible is True, the control appears. If Visible is False, the control is not visible.
- Type:
bool
- VisibleColumnCount¶
Embarcadero Technologies does not currently have any additional information.
- Type:
int
- VisibleRows¶
Indicates the number of scrollable rows that are visible in the grid. Use VisibleRows to determine the number of scrollable rows that are fully visible in the grid. VisibleRows includes any partially visible rows on the top and bottom of the grid.
- Type:
int