Sign in Join
FPDoc Onlineexperiment

TGridColumn class

In unit Grids

Implements a column definition used for tabular data in TCustomGrid.

Declaration

pascal
TGridColumn = class(TCollectionItem)

Inheritance

  1. TGridColumn
  2. TCollectionItem
  3. TPersistent
  4. TObject

Descends from it: TColumn

Description

TGridColumn is a TCollectionItem descendant which implements a column definition for grid controls. TGridColumn contains properties which control the appearance, layout, and editing behavior used for a column in TCustomGrid and descendent classes. For instance:

  • Alignment
  • ButtonStyle
  • Color
  • DropDownRows
  • Font
  • Layout
  • MinSize
  • MaxSize
  • PickList
  • ReadOnly
  • Width
  • Visible
  • ValueChecked
  • ValueUnchecked

The column has an associated TGridColumnTitle class instance in Title that defines the fixed cell header displayed for the column. As a convenience, the column includes a reference to the TCustomGrid which uses the column definition.

Instances of TGridColumn are created by and stored in the TGridColumns collection class. Use the methods in TGridColumns to create, access, and maintain the items in the collection.

See also

Properties

IsDefaultFontprotectedIndicates if the default font is in use for the grid column.
GridpublicThe grid control to which this column belongs.
DefaultWidthpublicDefault width for the column, or -1 when not assigned.
StoredWidthpublicContains the explicit, non-default value assigned to the Width property.
WidthChangedpublicTrue when the width for the column has been changed.
AlignmentpublishedIndicates the alignment for values displayed in the column: left or right aligned, or centered.
ButtonStylepublishedThe style used for a button displayed for cells in the column.
ColorpublishedColor for the background on the column.
DropDownRowspublishedThe number of rows displayed in the drop-down list for a cell editor in the column.
ExpandedpublishedIndicates if the drop-down list in the column cell editor is displayed in an expanded state.
FontpublishedThe font used for text displayed in the column.
LayoutpublishedThe layout (vertical alignment) for text displayed in the column.
MinSizepublishedThe minimum size for the column in pixels.
MaxSizepublishedThe maximum size for the column in pixels.
PickListpublishedThe list with the values that can be selected for a cell in the column using a drop-down list.
ReadOnlypublishedTrue if the values in the column cannot be changed at run-time using the cell editor.
SizePrioritypublishedThe auto-sizing priority for the column.
TagpublishedContains a Pointer to an Integer type.
TitlepublishedContains the attributes for the title in the fixed header for the column.
WidthpublishedThe display width in pixels for the column on its Grid control.
VisiblepublishedTrue if the column is visible (not hidden) on the Grid control.
ValueCheckedpublishedContains the checked value for a check box in the column.
ValueUncheckedpublishedContains the unchecked value for a check box in the column.

Methods

GetDisplayNameprotectedReturns the of the collectionitem.
GetDefaultAlignmentprotectedGets the default value for the Alignment property.
GetDefaultColorprotectedGets the default value for the Color property.
GetDefaultLayoutprotectedDefault layout used for text in the grid column.
GetDefaultMaxSizeprotectedGets the default value for the MaxSize property.
GetDefaultMinSizeprotectedGets the default value for the MinSize property.
GetDefaultReadOnlyprotectedGets the default value for the ReadOnly property.
GetDefaultSizePriorityprotectedGets the default value for the SizePriority property.
GetDefaultVisibleprotectedGets the default value for the Visible property.
GetDefaultValueCheckedprotectedGets the default value for a checked cell in the grid column.
GetDefaultValueUncheckedprotectedGets the default value for an unchecked cell in the column.
GetDefaultWidthprotectedGets the default value for the Width property.
GetPickListprotectedGets the list of strings in the picklist.
GetValueCheckedprotectedGets the value for the ValueChecked property.
GetValueUncheckedprotectedGets the value for the ValueUnChecked property.
ColumnChangedprotectedPerforms actions needed when a column in the grid is changed.
AllColumnsChangeprotectedMethod used to indicate that all columns in the collection have been changed.
CreateTitleprotectedCreates a column title used for the grid column.
SetIndexprotectedSets the value for the Index property.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
AssignpublicCopies property values from the specified persistent object to the current class instance.
FillDefaultFontpublicSets the Font to the value used in the grid control.
FixDesignFontsPPIpublicCorrects the design-time PPI for the column title.
ScaleFontsPPIpublicScales the fonts for the column to a specified display density using a scaling factor.
IsDefaultpublicIndicates if default layout settings are used for the grid column.

Inherited

From TCollectionItem (9)

Changed Collection DisplayName GetNamePath GetOwner ID Index SetCollection SetDisplayName

From TPersistent (5)

AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.