CustomDrawGrid¶
Qualified name: delphivcl.CustomDrawGrid
- class CustomDrawGrid¶
Bases:
CustomGridTCustomDrawGrid is the base class for grids that publish events for painting and manipulating the cells in the grid. Use TCustomDrawGrid as a base class when defining grid components that publish events for painting or manipulating the cells in the grid. TCustomDrawGrid introduces a number of events and methods that take advantage of the tabular organization of the grid in responding to user actions. Do not create instances of TCustomDrawGrid. Instead, put a grid control in a form by instantiating a descendant of TCustomDrawGrid. Use TDrawGrid to represent non-textual material in a tabular grid. For text, use a TStringGrid object. If the text represents field values from a dataset, use TDBGrid. If you are displaying Name/Value pairs, use TValueListEditor.
Methods
TWinControl.CanFocus() Indicates whether a control can receive focus.
TCustomDrawGrid.CellRect(ACol: int, ARow: int) -> Rect Returns the screen coordinates of a cell in the grid.
TCustomDrawGrid.MouseToCell(X: int, Y: int, ACol: int, ARow: int) -> None Returns the column and row of the cell at the position with screen coordinates (X,Y).
TWinControl.SetFocus() Gives the input focus to the control.
Attributes
ActionSpecifies the action associated with the control.
AlignDetermines how the control aligns within its container (parent control).
AlignDisabledIndicates child control realignment disabled.
AlignWithMarginsSpecifies whether a control should be constrained by margins.
AnchorsSpecifies how the control is anchored to its parent.
BiDiModeSpecifies the bidirectional mode for the control.
BoundsRectSpecifies the bounding rectangle of the control, expressed in the coordinate system of the parent control.
BrushDetermines the color and pattern used for painting the background of the control.
Specifies the TCanvas object that presents a drawing surface for the control.
Alignment:
ClassNameReturns the TObject.ClassName
ClientHeightSpecifies the height of the control's client area in pixels.
ClientOriginSpecifies the screen coordinates (in pixels) of the upper-left corner of a control's client area.
ClientRectSpecifies the size of a control's client area in pixels.
ClientWidthSpecifies the horizontal size of the control's client area in pixels.
Specifies the index of the column that contains the selected cell.
Alignment:
Specifies column widths of the grid
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
ConstraintsSpecifies the size constraints for the control.
ControlCountReturns the count of contained controls
ControlStateSpecifies the current state of a control at run time.
ControlStyleDetermines style characteristics of the control.
ControlsReturns an iterator over contained controls
CurrentPPIEmbarcadero Technologies does not currently have any additional information.
CursorSpecifies the image used to represent the mouse pointer when it passes into the region covered by the control.
CustomHintCustomHint is a custom hint for the control.
DesignInfoContains information used by the Form designer.
DockClientCountSpecifies the number of controls that are docked on the windowed control.
DockClientsControl:
DockManagerSpecifies the control's docking manager interface.
DockOrientationDockOrientation specifies how the control is docked relative to other controls docked in the same parent.
DockSiteSpecifies whether the control can be the target of drag-and-dock operations.
DoubleBufferedDetermines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first.
DoubleBufferedModeDoubleBufferedMode:
Determines the style used when drawing the grid.
Determines whether the current cell can be edited.
EnabledControls whether the control responds to mouse, keyboard, and timer events.
ExplicitHeightSpecifies the explicit vertical size of the control in pixels.
ExplicitLeftSpecifies the explicit horizontal pixel coordinate of the left edge of a component relative to its parent.
ExplicitTopSpecifies the explicit vertical pixel coordinate of the top edge of a component relative to its parent.
ExplicitWidthSpecifies the explicit horizontal size of the control in pixels.
FloatingSpecifies whether the control is floating.
FloatingDockSiteClassSpecifies the class of the temporary control that hosts the control when it is floating.
FocusedDetermines whether the control has input focus.
Specifies the height of the grid in pixels.
Specifies the width of the grid in pixels.
HandleProvides access to the underlying Windows screen object for the control.
HandleAllocatedReports whether a screen object handle exists for the control.
HeightSpecifies the vertical size of the control in pixels.
HelpContextThe HelpContext property contains the numeric context ID that identifies the Help topic for the control.
HelpKeywordThe HelpKeyword property contains 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.
HintHint contains the text string that appears when the user moves the mouse over the control.
HostDockSiteSpecifies the control in which the control is docked.
IsDrawingLockedIsDrawingLocked property returns True when redrawing for this control is locked.
IsUpdatingEmbarcadero Technologies does not currently have any additional information.
LRDockWidthSpecifies the width of the control when it is docked horizontally.
LeftSpecifies the horizontal coordinate of the left edge of a component relative to its parent.
Specifies the index of the first visible scrollable column in the grid.
MarginsSpecifies the margins of the control.
MouseInClientIndicates whether the mouse pointer is currently in the client area of the control.
NameSpecifies the name of the component as referenced in code.
ObserversIndicates the TObservers object added to the TComponent.
OwnerReturns the Component Owner
PaddingSpecifies the padding of a control.
ParentReturns/Sets the Control Parent
ParentCustomHintSpecifies where a control looks for its custom hint.
ParentDoubleBufferedParentDoubleBuffered defers the DoubleBuffered property of this component to the value of the parent's DoubleBuffered property.
ParentWindowReference to parent's underlying control.
PixelsPerInchEmbarcadero Technologies does not currently have any additional information.
RedrawDisabledRedrawDisabled property returns True when redrawing for this control is locked.
Specifies the index of the row that contains the selected cell.
Specifies row heights of the grid
ScaleFactorEmbarcadero Technologies does not currently have any additional information.
Indicates the boundaries of the current selection.
ShowHintShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control.
ShowingIndicates whether the control is showing on the screen.
StyleElementsSpecifies the style elements that are used by the control.
StyleNameEmbarcadero Technologies does not currently have any additional information.
TBDockHeightSpecifies the height of the control when it is docked vertically.
TabOrderIndicates the position of the control in its parent's tab order.
TabStopDetermines whether the user can tab to a control.
bool:
TagStores a NativeInt integral value as a part of a component.
TopSpecifies the Y coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels.
Specifies the index of the first visible scrollable row in the grid.
TouchSpecifies the touch manager component associated with the control.
UndockHeightSpecifies the height of the control when it is floating.
UndockWidthSpecifies the width of the control when it is floating.
UseDockManagerSpecifies whether the docking manager is used in drag-and-dock operations.
VCLComObjectRepresents information used internally by components that support COM.
VisibleSpecifies whether the component appears onscreen.
VisibleDockClientCountSpecifies the number of visible controls that are docked on the windowed control.
WidthSpecifies the horizontal size of the control or form in pixels.
- CanFocus()¶
Indicates whether a control can receive focus.
- Canvas¶
Specifies the TCanvas object that presents a drawing surface for the control.
- CellAlignments¶
Alignment:
- CellRect(ACol: int, ARow: int) Rect¶
Returns the screen coordinates of a cell in the grid. Call CellRect to obtain the boundaries, in pixels, of the cell in the column and row indicated by the ACol and ARow parameters. The top left cell is specified when ACol and ARow are set to zero. If the indicated cell is not visible, CellRect returns an empty rectangle.
- Col¶
Specifies the index of the column that contains the selected cell.
- ColAlignments¶
Alignment:
- ColWidths¶
Specifies column widths of the grid
- DrawingStyle¶
Determines the style used when drawing the grid. DrawingStyle determines the style used to draw the grid. The following table lists the possible values of DrawingStyle.
Value
Meaning
gdsClassic
The grid control uses the standard, unthemed style.
gdsThemed
The grid control uses the current operating system theme.
gdsGradient
The grid control uses gradients for styling.
Notes about DrawingStyle for Vcl.Grids.TStringGrid: Setting FixedColor has no effect unless you also set DrawingStyle to gdsClassic. Setting GradientStartColor and GradientEndColor has no effect unless you set the value of DrawingStyle to gdsGradient.
- Type:
GridDrawingStyle
- EditorMode¶
Determines whether the current cell can be edited.
- GridHeight¶
Specifies the height of the grid in pixels.
- GridWidth¶
Specifies the width of the grid in pixels.
- LeftCol¶
Specifies the index of the first visible scrollable column in the grid.
- MouseToCell(X: int, Y: int, ACol: int, ARow: int) None¶
Returns the column and row of the cell at the position with screen coordinates (X,Y). Call MouseToCell to convert from grid-relative screen coordinates to row and column indexes. The X and Y parameters are the screen coordinates of the point to be converted. MouseToCell returns the ACol parameter as the number of the column over the point (X,Y), and the ARow parameter as the number of the row. Usually the MouseToCell method is used in a mouse event handler, which supplies the mouse coordinates as the X and Y parameters of the method call.
- Row¶
Specifies the index of the row that contains the selected cell.
- RowHeights¶
Specifies row heights of the grid
- Selection¶
Indicates the boundaries of the current selection.
- SetFocus()¶
Gives the input focus to the control.
- TabStops¶
bool:
- TopRow¶
Specifies the index of the first visible scrollable row in the grid.