Header Interface Reference

A Header is a control that is may be positioned above columns of a table. More...

Inheritance diagram for Header:

Inheritance graph
Collaboration diagram for Header:

Collaboration graph
List of all members.

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.

Detailed Description

A Header is a control that is may be positioned above columns of a table.

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()

Result:
Header.jpg

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()

Result:
Header2.jpg


Member Function Documentation

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.

Parameters:
Text Specifies the title of the HeaderItem.
Width Specifies the width of the HeaderItem.
TextAlign Specifies the text align of the HeaderItem.
Return values:
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.

Parameters:
Index The index of the element to remove or the element itself.


Property Documentation

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.

Since:
1.1.9.

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.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:12:41 2015. (C) Veretennikov A. B. 2004-2015