ToolBar Interface Reference

A toolbar is a control that contains one or more buttons. More...

Inheritance diagram for ToolBar:

Inheritance graph
Collaboration diagram for ToolBar:

Collaboration graph
List of all members.

Properties

IDispatch *RW Buttons []
 The Action object that represents the toolbar buttons.
VARIANT_BOOL RW Flat []
 Specifies that the toolbar is a flat toolbar.
VARIANT_BOOL RW ShowText []
 Hides or shows the buttons text.
ULONG RW ButtonWidth []
 Specifies the width of each button.
ULONG RW ButtonHeight []
 Specifies the height of each button.
VARIANT_BOOL RW AutoSizeButtons []
 Specifies the width of each button is determined automaticly.
VARIANT_BOOL RW List []
 Specifies that button text displayed on the right of the button's image.
VARIANT_BOOL RW Wrapable []
 Specifies that the Toolbar can have multiple lines of buttons.
VARIANT_BOOL RW AutoSize []
 Specifies the size of the toolbar is determined automaticly.
VARIANT_BOOL RW Vertical []
 Specifies that the toolbar has vertical orientation.
ULONG RW MinButtonWidth []
 Specifies the minimum button widths in the toolbar.
ULONG RW MaxButtonWidth []
 Specifies the minimum button heights in the toolbar.
ULONG RW MaxTextRows []
 Specifies the maximum number of text rows displayed on a toolbar button.
ULONG RW PaddingX []
 Specifies the width of the padding inside the toolbar buttons, between the content and the edge of the button.
ULONG RW PaddingY []
 Specifies the height of the padding inside the toolbar buttons, between the content and the edge of the button.
ULONG RW ButtonSpacingX []
 Specifies the width of the space between the toolbar buttons.
ULONG RW ButtonSpacingY []
 Specifies the height of the space between the toolbar buttons.

Detailed Description

A toolbar is a control that contains one or more buttons.

A toolbar button executes an Action when clicked.

See also the method CreateToolBar of the Frame.

Example:

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

ToolBar = f.CreateToolBar(10,10,300,25)
ToolBar.ShowText = true
ToolBar.Buttons.Images.Load(CurrentDir() + "ToolBar.bmp")
with (ToolBar.Buttons)
{
        with (Add("Item 1"))
        {
                ImageIndex = 1
        }
        with (Add("Item 2"))
        {
                ImageIndex = 2
        }
        with (Add("Item 3"))
        {
                ImageIndex = 3
        }
}

f.Show()

o.Run()


function CurrentDir() {s = WScript.ScriptFullName; s = s.substring(0,s.lastIndexOf("\\")+1); return s; }
Result:
ToolBar.jpg


Property Documentation

VARIANT_BOOL RW AutoSize

Specifies the size of the toolbar is determined automaticly.

VARIANT_BOOL RW AutoSizeButtons

Specifies the width of each button is determined automaticly.

ULONG RW ButtonHeight

Specifies the height of each button.

IDispatch* RW Buttons

The Action object that represents the toolbar buttons.

ULONG RW ButtonSpacingX

Specifies the width of the space between the toolbar buttons.

Requires Comctl32.dll version 6. Requires visual styles (Themes).

Since:
1.1.15.
See also:
TB_SETMETRICS.

ULONG RW ButtonSpacingY

Specifies the height of the space between the toolbar buttons.

Requires Comctl32.dll version 6. Requires visual styles (Themes).

Since:
1.1.15.
See also:
TB_SETMETRICS.

ULONG RW ButtonWidth

Specifies the width of each button.

VARIANT_BOOL RW Flat

Specifies that the toolbar is a flat toolbar.

VARIANT_BOOL RW List

Specifies that button text displayed on the right of the button's image.

ULONG RW MaxButtonWidth

Specifies the minimum button heights in the toolbar.

AutoSizeButtons must be "FALSE".

See also:
TB_SETBUTTONWIDTH.
Since:
1.1.15.

ULONG RW MaxTextRows

Specifies the maximum number of text rows displayed on a toolbar button.

If not specified and button text is too wide, the control displays it with ellipsis points. AutoSizeButtons must be "FALSE", otherwise text always shown on a single line. MaxButtonWidth must be specified.

Since:
1.1.15.
See also:
TB_SETMAXTEXTROWS.

ULONG RW MinButtonWidth

Specifies the minimum button widths in the toolbar.

AutoSizeButtons must be "FALSE".

See also:
TB_SETBUTTONWIDTH.
Since:
1.1.15.

ULONG RW PaddingX

Specifies the width of the padding inside the toolbar buttons, between the content and the edge of the button.

Requires Comctl32.dll version 6. Requires visual styles (Themes).

Since:
1.1.15.
See also:
TB_SETMETRICS.

ULONG RW PaddingY

Specifies the height of the padding inside the toolbar buttons, between the content and the edge of the button.

Requires Comctl32.dll version 6. Requires visual styles (Themes).

Since:
1.1.15.
See also:
TB_SETMETRICS.

VARIANT_BOOL RW ShowText

Hides or shows the buttons text.

VARIANT_BOOL RW Vertical

Specifies that the toolbar has vertical orientation.

VARIANT_BOOL RW Wrapable

Specifies that the Toolbar can have multiple lines of buttons.


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