The type of header cell.
Usage
Set_Property(OLECtrlEntID, "OLE.HeaderType[col; row]", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Type | Option | The header cell's type. (See Remarks) | Header |
<2> | Parameters | Multivalue | Parameters specific to the Type, (See Remark) | N/A |
Indices
Index | Description |
---|---|
col | Index to an existing header column |
row | Index to an existing header row |
Remarks
The HeaderType property establishes a header cell's generic behavior. By default, all header cells are "Header" type cells, containing only a caption.
The possible values for the Type field are:
Value | Abbr. | Description |
---|---|---|
Header | HDR | A normal header cell containing only a caption |
Hyperlink | HYP | A header cell whose caption is clickable and fires OnHyperClick events |
Flashing | FLS | A header cell whose text flashes to alert the user |
Many header cell types require extra data for initialization. The extra data is provided via the Parameters field of this property (field 2). Here is a list of the parameters for each type:
You must always set the first field of this property, even if you just want to update the type parameter information.
Header
The Header cell type is simply a header cell with no bells and whistles. It only contains a static caption, and all header cells are Header type cells be default. This type takes no parameters and ignores the Parameter field.
Hyperlink
Pos | Name | Type | Description |
---|---|---|---|
<2, 1> | HyperFont | Font | The font when the caption is hot |
<2, 2> | HyperColor | Number | The color when the caption is hot |
A Hyperlink header cell is one whose text can be clicked, which will fire OnHyperClick events. You can use the event to link the text to other forms, data, web pages, etc.
The HyperFont parameter is the Font to be used when the caption is hot. A header cell's caption is hot when the mouse hovers over it. The HyperColor parameter is the Color to be used when the caption is hot. When the caption is not hot, then the header cell's HeaderColors values are used.
Flashing
Pos | Name | Type | Description |
---|---|---|---|
<2, 1> | FlashColor | Color | The flashing color of the caption white |
<2, 2> | Delay | Integer | The time in milliseconds to delay flashing |
<2, 3> | Smooth | Boolean | If true, the caption fades in and out of its flash color; if false, it simply alternates flash and text colors |
The Flashing header cell type can be used to alert the user to important events or changes in status. A flashing header cell alternates between its foreground color and the provided FlashColor parameter. The flash frequency is determined by the Delay parameter, which takes a number representing milliseconds. Finally, the Smooth parameter determines if the caption fades to and from the flash color or if it simply toggles directly between the two. Experiment with different settings to get the desired effect.
Example
/////////////////////////////////// // HEADER // Set a normal header cell Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Caption") /////////////////////////////////// // HYPERLINK // Set a hyperlink header cell Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Hyperlink") // Set a hyperlink header cell with custom font Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Hyperlink":@FM:"Ariel":@SVM:"10") // Set a hyperlink header cell with custom font and color Set_Property(@Window:".OLE_EDITTABLE", "OLE.CellType[1; 1]", "Hyperlink":@FM:"Ariel":@SVM:"10":@VM:"{255, 0, 255}") /////////////////////////////////// // FLASHING // Set a flashing header cell Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Flashing") // Set a flashing header cell with custom color Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Flashing":@FM:"{255, 0, 255}") // Set a flashing header cell with custom color and delay Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Flashing":@FM:"{255, 0, 255}":@VM:1000) // Set a flashing header cell with custom color, delay, and with smoothing effect Set_Property(@Window:".OLE_EDITTABLE", "OLE.HeaderType[1; 1]", "Flashing":@FM:"{255, 0, 255}":@VM:1000:@VM:1)