Inheritance diagram for Header:
Public Member Functions | |
Remove ([in] VARIANT Index) | |
Call this method to remove one item from the collection. | |
Clear () | |
Removes all of the items from the collection. | |
Add ([in] BSTR Text,[in, defaultvalue(100)] LONG Width,[in, defaultvalue(AL_LEFT)] LONG TextAlign,[out, retval] IDispatch **pItem) | |
This method creates a new HeaderItem. | |
Properties | |
LPUNKNOWN R | _NewEnum [] |
Returns the enumerator for the collection. | |
VARIANT R | Item [[in] long Index] [] |
Returns the specified item in the collection. | |
long R | Count [] |
Returns the number of items in the collection. | |
IDispatch *RW | Images [] |
Determines which ImageList is linked with the Header. | |
VARIANT_BOOL RW | HotTrack [] |
Specifies that the header items under the mouse pointer are automatically highlighted. | |
VARIANT_BOOL RW | Flat [] |
Specifies that the header items appear with the flat style. | |
VARIANT_BOOL RW | DragDrop [] |
Enables drag-and-drop reordering of columns. | |
VARIANT W | OnColumnClick [] |
Sets the event handler for the OnColumnClick event. | |
VARIANT W | OnColumnResize [] |
Sets the event handler for the OnColumnResize event. |
The Header contains a title for each column. The Header object is an collection of HeaderItem objects.
See also the method CreateHeader of the Frame.
See also HeaderEvents.
Example (JScript):
o = new ActiveXObject("Scripting.WindowSystemObject") f = o.CreateForm(0,0,0,0) f.Text = "WSO" f.ClientWidth = 320 f.ClientHeight = 100 f.CenterControl() Header = f.CreateHeader(10,10,300,25) with (Header) { Add("Column 1") Add("Column 2") Add("Column 3") } f.Show() o.Run()
Example 2 (JScript):
o = new ActiveXObject("Scripting.WindowSystemObject") o.EnableVisualStyles = true f = o.CreateForm(0,0,0,0) f.Text = "WSO" f.ClientWidth = 320 f.ClientHeight = 100 f.CenterControl() Header = f.CreateHeader(10,10,300,25) with (Header) { Add("Column 1") Add("Column 2") Add("Column 3") } f.Show() o.Run()
Add | ( | [in] BSTR | Text, | |
[in, defaultvalue(100)] LONG | Width, | |||
[in, defaultvalue(AL_LEFT)] LONG | TextAlign, | |||
[out, retval] IDispatch ** | pItem | |||
) |
This method creates a new HeaderItem.
Text | Specifies the title of the HeaderItem. | |
Width | Specifies the width of the HeaderItem. | |
TextAlign | Specifies the text align of the HeaderItem. |
pItem | HeaderItem object |
Clear | ( | ) |
Removes all of the items from the collection.
Remove | ( | [in] VARIANT | Index | ) |
Call this method to remove one item from the collection.
Index | The index of the element to remove or the element itself. |
LPUNKNOWN R _NewEnum |
Returns the enumerator for the collection.
long R Count |
Returns the number of items in the collection.
VARIANT_BOOL RW DragDrop |
Enables drag-and-drop reordering of columns.
Comctl32.dll 4.70 required.
VARIANT_BOOL RW Flat |
Specifies that the header items appear with the flat style.
VARIANT_BOOL RW HotTrack |
Specifies that the header items under the mouse pointer are automatically highlighted.
IDispatch* RW Images |
Determines which ImageList is linked with the Header.
See also ImageIndex.
VARIANT R Item[[in] long Index] | ( | ) |
Returns the specified item in the collection.
VARIANT W OnColumnClick |
Sets the event handler for the OnColumnClick event.
This event occurs when the user clicks a header item.
VARIANT W OnColumnResize |
Sets the event handler for the OnColumnResize event.
This event occurs when the user resizes a header item.