of_addSeparator

Description

Adds a separator item to the toolbar.

Syntax

of_addSeparator({Integer position})

Parameter(s)

Name Type Description
position Integer Indicates which "side" of the toolbar to which the item is to be anchored. Values allowed for this parameter are LEFT (1) and RIGHT (2). This parameter is optional and the default value is LEFT

Return Value

Returns a long containing the index of the item.

Usage

When items are added the RIGHT position, items are added from right-to-left, like a pop stack. When items are added using the LEFT position, they are added left-to-right.

The visible property of separators is handled automatically by the toolBar's update logic. Hanging separators, ones at the end or beginning or the LEFT or RIGHT side, are not shown. Also, if items are added in such a way as to create two adjacent separators, the second one is hidden so the user only sees one separator.

Examples

of_addItem('Open',    'open.bmp')
of_addItem('Save',    'save.bmp')
of_addSeparator()
of_addItem('Print',   'print.bmp')
of_addItem('Preview', 'preview.bmp')
of_addItem('Exit',    'powerOff.bmp', 'Close the window', RIGHT)


Doc_3.jpg

See Also

Last edited Sep 24, 2016 at 1:57 PM by cjharris02892, version 10