CustomGrid¶
Qualified name: delphifmx.CustomGrid
- class CustomGrid¶
Bases:
CustomPresentedScrollBox
Methods
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.
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.
Returns the coordinates of the cell at the specified row and column.
Removes and destroys all columns.
Returns the column with the given index.
Returns the column at the given left and top coordinates.
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.
Call this procedure to get and apply its style lookup.
Call this procedure to indicate that this control requires to get and apply its style lookup.
Returns the index of row at the given left and top coordinates.
Changes the viewport position so that the selected cell is visible.
Selects the cell with the specified index of column and rows.
Selects the cell with the specified column index and old row index.
Selects the cell with the specified row index and old column index.
Changes the viewport position so that the cell at the specified column number and row number is located on the top-left corner.
Embarcadero Technologies does not currently have any additional information.
Unloads the previously-loaded presentation of your control.
Attributes
AbsoluteClipRect
Specifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabled
Specifies whether the control is absolutely enabled.
AbsoluteHeight
Specifies the absolute height of the control.
AbsoluteMatrix
Specifies the absolute transformation matrix of the control.
AbsoluteOpacity
Specifies the absolute opacity of the control.
AbsoluteRect
Specifies the absolute rectangle that bounds the control.
AbsoluteScale
Specifies the absolute scale of the control.
AbsoluteWidth
Specifies the absolute width of the control.
ActionClient
Specifies 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
Align
Specifies 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.
ApplyingEffect
A flag that signals when a control is in the process of applying an effect.
AutoCalculateContentSize
Indicates that the size of the scrolling content is calculated automatically according to the size of the components in content.
AutoCapture
Specifies whether the control captures mouse events.
AutoHide
Defines that scrollbars hide automatically when you scroll.
Specifies whether the control's text should be translated
AxisAlignedRect
A TRectF defined by the width and height of the control.
Embarcadero Technologies does not currently have any additional information.
Bounces
Indicates if it is possible to scroll content abroad.
BoundsRect
Specifies the bounding rectangle of the control.
Specifies whether the current control can receive focus.
CanParentFocus
Specifies whether the parent of this control should be evaluated to receive focus.
Canvas
Provides the drawing surface of the control.
Children
Stores an array of children attached to this parent component.
ChildrenCount
Read-only property that specifies the number of children in the children list.
ChildrenRect
Specifies the bigger rectangle area occupied by parent and children controls.
ClassName
Returns the TObject.ClassName
ClipChildren
Specifies if children of the control should be clipped to the control's on-screen region.
ClipParent
Specifies whether the current control has clipped its parent.
ClipRect
Specifies 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:
ComObject
Specifies the interface reference implemented by the component.
ComponentCount
Returns the owned component count
ComponentIndex
Indicates the position of the component in its owner's Components property array.
ComponentState
Describes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyle
Governs the behavior of the component.
Components
Returns an iterator over the owned components
Content
Container that can hold scrollable content of the scroll box.
ContentBounds
The content bounds.
ContentLayout
Returns the control from style that will wrap its scrolling content.
ContentSize
Current content size.
ControlType
ControlType:
Controls
Returns an iterator over contained controls
ControlsCount
Returns the count of contained controls
Cursor
Image to use to represent the mouse pointer when it passes into the region covered by the control.
Data
Stores 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).
DefaultSize
Embarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
DesignInfo
Contains information used by the Form designer.
DisableDisappear
Embarcadero Technologies does not currently have any additional information.
DisableFocusEffect
Specifies whether the control has the focus effect disabled.
DisableMouseWheel
Defines that the control does not have reaction to Mouse-Wheel event.
DragMode
Specifies how the control initiates drag-and-drop operations.
Determines whether the grid control is in the edit mode (True) or not (False).
EnableDragHighlight
Specifies whether the control is highlighted when the dragged object is over it.
Specifies whether the control responds to mouse, keyboard, and timer events.
EnabledScroll
Enables or disables scrolling.
FixedSize
Embarcadero Technologies does not currently have any additional information.
HScrollBar
Returns the horizontal scrollbar component.
HasAfterPaintEffect
Specifies whether the control has an effect that is applied after the control is painted.
HasClipParent
Control that is a direct child of this control and has clipped this control.
HasDisablePaintEffect
Specifies whether the control's effect is painted.
HasEffect
Specifies whether the control has an applied effect.
Height
Height specifies the vertical size of the control (in dp).
HelpContext
Contains the numeric context ID that identifies the Help topic for the control.
HelpKeyword
Contains the keyword string that identifies the Help topic for the control.
HelpType
Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
Hint
Specifies the text string that appears when the user moves the mouse over a control.
HitTest
Enables the control to capture mouse events.
Specifies the list of images associated with this grid control.
InPaintTo
Specifies whether the control is currently being painted.
Index
Specifies the index of the child object in the children array attached to this object.
InheritedCursor
Image used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrix
Specifies the inverse matrix of AbsoluteMatrix.
IsDragOver
Specifies whether a dragged object is over the area of the current control.
IsFocused
Determines whether the control has input focus.
IsInflated
Whether the current style of this control has been actually applied to the control.
IsMouseOver
Specifies whether the mouse cursor is over the control.
This property is set by the LiveBinding.
IsVisible
Specifies 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.
LocalRect
Specifies the local rectangle for painting the control.
Locked
Specifies whether the control is locked at design time.
Margins
Aligns the component to the margins points of other components.
The data model representing the data used by the presentation of the current control.
Name
Specifies the name of the component as referenced in code.
Observers
Indicates the TObservers object added to the TComponent.
OnGesture
Callable[[Object, GestureEventInfo, bool], None]:
Opacity
Specifies the control opacity.
Defines how grid controls look like and how they behave.
Owner
Returns the Component Owner
Padding
Aligns the component to the padding points of other components.
Parent
Returns/Sets the Control Visibility
ParentClassStyleLookupName
The name of the default style of the parent class of this control.
ParentControl
Specifies the parent control of this control.
ParentedRect
Specifies the bounding rectangle of the control within its parent.
ParentedVisible
Specifies whether all the control's parents are visible.
PopupMenu
Specifies the context (pop-up) menu object.
Position
Returns an access to the position of the control inside its parent
Presentation
Object:
PresentationProxy
PresentationProxy:
PresentationState
PresentationState:
Pressed
Indicates whether the control is currently pressed.
PressedPosition
A 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.
Root
Specifies 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.
Scene
Specifies the current scene in which the control is drawn.
ScrollAnimation
Enables or disables scrolling animation.
ScrollDirections
Defines the available scroll directions.
Specifies the row where you are currently positioned within the grid.
ShowHint
Specifies whether the Hint can be shown.
ShowScrollBars
Defines scrollbars visibility.
ShowSizeGrip
Shows a small control in the right-bottom corner that represents the size of the changing control.
Size
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
Stored
Specifies whether this object is stored in the .XFM file.
Specifies the name of the resource object to which the current TStyledControl is linked
StyleName
Specifies 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.
StylesData
Value:
TabOrder
Indicates the position of the control in its parent's tab order.
TabStop
Embarcadero Technologies does not currently have any additional information.
Tag
Stores a NativeInt integral value as a part of a component.
TagFloat
Custom property that stores any floating-point value.
TagObject
Custom property that stores any object value.
TagString
Custom 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.
Touch
Specifies the touch manager component associated with the control.
TouchTargetExpansion
Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
TouchTracking
Defines if the control reacts to touch events.
UpdateRect
Specifies the rectangle area of the control that needs to be updated.
VCLComObject
Represents information used internally by components that support COM.
VScrollBar
Returns the vertical scrollbar component.
ViewportPosition
Position of the view port of the ScrollBox content.
ViewportSize
Size 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.
Width
Specifies 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