Syntax 1: For docked toolbars – PB Docs 2017

Syntax 1: For docked toolbars

Description

Sets the position of a docked toolbar.

Applies to

MDI frame and sheet windows

Syntax

Argument

Description

window

The MDI frame or sheet to which the toolbar
belongs.

toolbarindex

An integer whose value is the index of the toolbar whose
settings you want to change.

dockrow

An integer whose value is the number of the docking row
for the toolbar. Docking rows are numbered from left to right
or top to bottom.

offset

An integer whose value specifies the distance of the
toolbar from the beginning of the docking row. For toolbars at
the top or bottom, offset is measured from the left edge. For
toolbars on the left or right, offset is measured from the
top.

If insert is true, the offset you specify is adjusted so
that the toolbar does not overlap others in the row.

Specify an offset of 0 to position the toolbar ahead of
other toolbars in dockrow.

insert

A boolean value specifying whether you want to insert
the specified toolbar before the toolbars in dockrow causing
them to move over or down a row, or you want to add
toolbarindex to dockrow. Values are:

  • TRUE — Move any toolbars already in dockrow or
    higher rows over or down a row so that the toolbar you are
    moving is the only toolbar in the row.

  • FALSE — Add the toolbar you are moving to dockrow.
    Its position in relation to other toolbars in the row is
    determined by offset.

Return value

Integer.

Returns 1 if it succeeds. SetToolbarPos returns -1 if there is no
toolbar for the index you specify or if an error occurs. If any
argument’s value is null, returns null.

Usage

To find out whether the docked toolbar is at the top, bottom,
left, or right edge of the window, call GetToolbar.

If the toolbar’s alignment is floating, instead of docked, then
values you specify with Syntax 1 of SetToolbarPos take effect when you
change the alignment to a docked position with SetToolbar.

When insert is false, to move the toolbar before other toolbars in
dockrow, specify a value that is less than the offset for the existing
toolbars. If there is already a toolbar at offset 1, then you can move
the toolbar to the beginning of the row by setting offset to 0. If
offset is equal to or greater than the offset of existing toolbars, but
less than their end, the newly positioned toolbar will begin just after
the existing one. Otherwise, the toolbar will be positioned at
offset.

If the user drags the toolbar to a docked position, the new row
and offset replace values set with SetToolbarPos.

Examples

This example docks toolbar 1 at the left, adding it to docking row
1:

This example docks toolbar 2 at the left, adding it to docking row
1. If the toolbars already in the dock extend past offset 250, then the
offset of toolbar 2 is increased to accommodate them. Otherwise, it is
positioned at offset 250:

This example docks toolbar 2 at the left in docking row 2. Any
toolbar docked on the left in row 2 or higher is moved over a
row:

See also

GetToolbar

GetToolbarPos

SetToolbar


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x