
Best viewed with
|
|
Unit: gwGrid
TgwGridObject is the ancestor of TgwCell, TgwRow, TgwColumn and
TgwGridGridObject.
It defines properties which are common to Cells, Columns,
Rows and Grids.
Properties
Alignment,
BorderBottomColor,
BorderLeftColor,
BorderRightColor,
BorderTopColor,
BorderBottomStyle,
BorderLeftStyle,
BorderRightStyle,
BorderTopStyle,
Color,
CustomEditor,
EditorStyle,
FontBold,
FontColor,
FontItalic,
FontName,
FontSize,
FontStrikeout,
FontUnderline,
InheritOptions,
Locked,
Object_,
Selected,
Methods
Assign,
Inherit,
InheritAll,
 |
|
Alignment
|
|
|
property Alignment : TAlignment;
|
|
|
Description
|
Use Alignment to specify the text alignment for the grid
object (cell, row, column or grid).
These are the possible values of Alignment:
|
Value
|
Meaning
|
|
taLeftJustify
|
Left justification of text
|
|
taCenter
|
Center text
|
|
taRightJustify
|
Right justification of text
|
|
|
|
Default
|
taLeftJustify
|
|
|
|
Set the text alignment to right justification for cell[5,5]
Grid.Cell[5,5].Alignment := taRightJustify;
|
 |
|
BorderBottomColor
|
|
|
property BorderBottomColor : TColor;
|
|
|
Description
|
Use BorderBottomColor to specify the color of the bottom
border for the grid object (cell, row, column or grid).
|
|
|
Default
|
clSilver
|
|
|
This property has no effect if the border style is bsNone,
bsRaised or bsLowered
|
|
|
|
Set bottom border color of fifth row (row[4]) to red
Grid.Row[4].BorderBottomColor := clRed;
|
 |
|
BorderLeftColor
|
|
|
property BorderLeftColor : TColor;
|
|
|
Description
|
Use BorderLeftColor to specify the color of the left
border for the grid object (cell, row, column or grid).
|
|
|
See also
|
BorderBottomColor
|
 |
|
BorderRightColor
|
|
|
property BorderRightColor : TColor;
|
|
|
Description
|
Use BorderRightColor to specify the color of the right
border for the grid object (cell, row, column or grid).
|
|
|
See also
|
BorderBottomColor
|
 |
|
BorderTopColor
|
|
|
property BorderTopColor : TColor;
|
|
|
Description
|
Use BorderTopColor to specify the color of the top
border for the grid object (cell, row, column or grid).
|
|
|
See also
|
BorderBottomColor
|
 |
|
BorderBottomStyle
|
|
|
property BorderBottomStyle : TLineStyle;
|
|
|
Description
|
Use BorderBottomStyle to specify the style of the bottom
border for the grid object (cell, row, column or grid).
These are the possible values of BorderBottomStyle:
|
Value
|
Meaning
|
|
bsNone
|
No border
|
|
bsSingle
|
Single line border
|
|
bsDouble
|
Double line border
|
|
bsDotted
|
Dotted line border
|
|
bsRaised
|
Raised 3D border
|
|
bsLowered
|
Lowered 3D border
|
|
|
|
Default
|
bsNone
|
|
|
|
Set double line bottom border for the fifth row (Row[4])
Grid.Row[4].BorderBottomStyle := bsDouble
|
 |
|
BorderLeftStyle
|
|
|
property BorderLeftStyle : TLineStyle;
|
|
|
Description
|
Use BorderLeftStyle to specify the style of the left
border of the grid object (cell, row, column or grid).
|
|
|
See also
|
BorderBottomStyle
|
 |
|
BorderRightStyle
|
|
|
property BorderRightStyle : TLineStyle;
|
|
|
Description
|
Use BorderRightStyle to specify the style of the right
border of the grid object (cell, row, column or grid).
|
|
|
See also
|
BorderBottomStyle
|
 |
|
BorderTopStyle
|
|
|
property BorderTopStyle : TLineStyle;
|
|
|
Description
|
Use BorderTopStyle to specify the style of the top
border of the grid object (cell, row, column or grid).
|
|
|
See also
|
BorderBottomStyle
|
 |
|
Color
|
|
|
property Color : TColor;
|
|
|
Description
|
Use Color to specify the background color for the grid
object (cell, row, column or grid).
|
|
|
Default
|
clWhite
|
|
|
|
Set the background color to blue for cell5,5]
Grid.Cell[5,5].Color := clBlue;
|
 |
|
CustomEditor
|
|
|
property CustomEditor : TWinControl;
|
|
|
Description
|
Use CustomEditor to specify the custom editor to be used
when editing the grid object (cell, row, column or grid).
|
|
|
Default
|
nil
|
|
|
This property has no effect unless EditorStyle is
esCustom
|
|
|
See also
|
EditorStyle
|
 |
|
EditorStyle
|
|
|
property EditorStyle : TEditorStyle;
|
|
|
Description
|
Use EditorStyle to specify the type of inplace editor to
be used when editing the grid object (cell, row, column or
grid).
These are the possible values of EditorStyle:
|
Value
|
Meaning
|
|
esNone
|
No editor
|
|
esDefault
|
Default editor
|
|
esCustom
|
Custom editor
|
|
|
|
Default
|
esDefault
|
|
|
See also
|
CustomEditor
|
 |
|
FontBold
|
|
|
property FontBold : boolean;
|
|
|
Description
|
Use FontBold to specify font bolding for the grid object
(cell, row, column or grid).
|
|
|
Default
|
false
|
|
|
|
Set bold font for cell[5,5]
Grid.Cell[5,5].FontBold := true;
|
 |
|
FontColor
|
|
|
property FontColor : Tcolor;
|
|
|
Description
|
Use FontColor to specify the color used to display text
for the grid object (cell, row, column or grid).
|
|
|
Default
|
clBlack
|
|
|
|
Set font color to red for the entire grid
Grid.FontColor := clRed;
|
 |
|
FontItalic
|
|
|
property FontItalic : boolean;
|
|
|
Description
|
Use FontItalic to specify font italics for the grid
object (cell, row, column or grid).
|
|
|
Default
|
false
|
|
|
|
Set italic font for the first row (Row[0])
Grid.Row[0].FontItalic := true;
|
 |
|
FontName
|
|
|
property FontName : TMyFontName;
|
|
|
Description
|
Use FontName to specify the name of the font for the
grid object (cell, row, column or grid).
|
|
|
Default
|
MS Sans Serif
|
|
|
|
Set the font name of the third column (Column[2]) to
'Arial'
Grid.Column[2].FontName := 'Arial';
|
 |
|
FontSize
|
|
|
property FontSize : integer;
|
|
|
Description
|
Use FontSize to specify the font size for the grid
object (cell, row, column or grid).
|
|
|
Default
|
8
|
|
|
|
Set the font size of the third column (Column[2]) to 10
Grid.Column[2].FontSize := 10;
|
 |
|
FontStrikeout
|
|
|
property FontStrikeout : boolean;
|
|
|
Description
|
Use FontStrikeout to specify font strikeout for the
grid object (cell, row, column or grid).
|
|
|
Default
|
false
|
|
|
|
Set strikeout for the first row (Row[0])
Grid.Row[0].FontStrikeout := true;
|
 |
|
FontUnderline
|
|
|
property FontUnderline : boolean;
|
|
|
Description
|
Use FontUnderline to specify font underlining for the
grid object (cell, row, column or grid).
|
|
|
Default
|
false
|
|
|
|
Set underline for the first row (Row[0])
Grid.Row[0].FontUnderline := true;
|
 |
|
InheritOptions
|
|
|
property InheritOptions : TInheritOptions;
|
|
|
Description
|
Use InheritOptions to determine which properties (for
example FontName) are inherited from the parent grid
object (row, column or grid).
Initially every property of a grid object (cell, row, column)
is inherited. As a grid object's properties are explicitly set
they are removed from InheritedProperties.
For example, initially a row's InheritedProperties will
contain ptFontName which indicates that the font used
for displaying text in that row is inherited from the grid's
FontName property. If the row's FontName property
is set ptFontName will be removed from the row's
InheritedProperties which then indicates that the row's
FontName is no longer inherited from the grid's
FontName.
This inheritance feature gives you great flexibility in
determining the appearance of your grids.
TInheritOptions is a set of the following values:
|
Value
|
Meaning
|
|
ptAlignment
|
Alignment property
|
|
ptBlink
|
Blink property
|
|
ptBorderBottomColor
|
BorderBottomColor property
|
|
ptBorderBottomStyle
|
BorderBottomStyle property
|
|
ptBorderLeftColor
|
BorderLeftColor property
|
|
ptBorderLeftStyle
|
BorderLeftStyle property
|
|
ptBorderRightColor
|
BorderRightColor property
|
|
ptBorderRightStyle
|
BorderRightStyle property
|
|
ptBorderTopColor
|
BorderTopColor property
|
|
ptBorderTopStyle
|
BorderTopStyle property
|
|
ptColor
|
Color property
|
|
ptFontBold
|
FontBold property
|
|
ptFontColor
|
FontColor property
|
|
ptFontItalic
|
FontItalic property
|
|
ptFontName
|
FontName property
|
|
ptFontSize
|
FontSize property
|
|
ptFontUnderline
|
FontUnderline property
|
|
ptLocked
|
Locked property
|
|
ptSelected
|
Selected property
|
|
|
|
Default
|
All properties are inherited
|
 |
|
Locked
|
|
|
property Locked : boolean;
|
|
|
Description
|
Use Locked to determine whether the grid object (cell,
row, column or grid) is locked or unlocked.
When a grid object is locked it cannot be focused.
|
|
|
Default
|
false
|
|
|
|
Lock second column (Column[1])
Grid.Column[1].Locked := true;
|
 |
|
Object_
|
|
|
property Object_ : TObject;
|
|
|
Description
|
Use Object_ to associate a TObject with the grid object (cell, row, column or grid).
|
|
|
You are responsible for freeing any object stored in the Object_ property
|
 |
|
Selected
|
|
|
property Selected : boolean;
|
|
|
Description
|
Use Selected to determine if the grid object (cell,
row, column or grid) is selected.
|
|
|
|
Select the third row (Row[2])
Grid.Row[2].Selected := true;
|
 |
|
Assign
|
|
|
procedure Assign(AGridObject : TGridObject; Ignore : TInheritOptions); virtual;
|
|
|
Description
|
Call Assign to assign one grid object to another.
Any properties specified by the Ignore parameter with not be assigned.
|
|
|
|
Assign row[2] to row[3] but do not any Font properties
Grid.Row[3].Assign(Grid.Row[2], [ptFontName, ptFontBold,
ptFontItalic, ptFontUnderline,
ptFontStrikeout, ptFontSize]);
|
 |
|
Inherit
|
|
|
procedure Inherit(Value: TPropertyType); virtual;
|
|
|
Description
|
Call Inherit to inherit the property specified by
Value from the grid object's parent.
|
|
|
See also
|
InheritAll
|
|
|
|
Inherit second row's FontName from grid
Grid.Row[1].Inherit(ptFontName);
|
 |
|
InheritAll
|
|
|
procedure InheritAll;
|
|
|
Description
|
Call InheritAll to inherit all properties from the grid
object's parent.
|
|
|
See also
|
Inherit
|
|
|
|
Inherit all of second row's properties from grid
Grid.Row[1].InheritAll;
|
|
Copyright © 1998-2007 Innova Software ALL RIGHTS RESERVED
All trademarks are the property of their respective owners.
Webmaster webmaster@innovasoftware.com
|