Timing object  ToolbarItem object

Chapter 2: System Object Properties, Events, and Functions

Toolbar control

The Toolbar control is typically used as a visual extension to a Pocket PC application menu.

Properties

Toolbar property

Datatype

Description

Enabled

Boolean

Specifies whether the control is enabled. Values are:

  • TRUE – (Default) Control is enabled.

  • FALSE – Control is disabled. Tapping items in control causes device to beep.

Height

Integer

Specifies the height of the control, in PowerBuilder units.

Item[ ]

String array

Specifies the initial item strings in the ToolbarItem portion of the Toolbar control. After initialization, this array can be updated only through function calls, such as AddItem or DeleteItem.

ItemCount

Integer

Specifies the number of toolbar items in the Toolbar control. After initialization, this property can be updated only through function calls, such as AddItem or DeleteItem.

PictureHeight

Integer

Specifies the height of the picture, in pixels.

This property can be set only when there are no images in the image list. If the value is 0 at the time the first image is added, the size of that image is used to set the size of the rest of the images added.

PictureName[ ]

String array

Specifies the picture name for each item in the Item property array. After initialization, this array can be updated only through the AddPicture function call.

PictureWidth

Integer

Specifies the width of the picture, in pixels.

This property can only be set when there are no images in the image list. If the value is 0 at the time the first image is added, the size of that image is used to set the size of the rest of the images added.

Position

ToolbarAlignment (enumeration)

Specifies whether the toolbar is docked at the top or the bottom. Values are:

  • AlignAtBottom!

  • AlignAtTop!

  • Floating!

Visible

Boolean

Specifies whether the control is visible. Values are:

  • TRUE – (Default) Control is visible

  • FALSE – Control is not visible

Width

Integer

Read-only property that specifies the width of the control, in PowerBuilder units.

Wrap

Boolean

Specifies whether toolbar items wrap onto a second line. Values are:

  • TRUE – (Default) Toobar items wrap

  • FALSE – Toolbar items do not wrap

X

Integer

Read-only property that specifies the X position (the distance from the left edge of the parent window), in PowerBuilder units.

Y

Integer

Read-only property that specifies the Y position (the distance from the top of the parent window), in PowerBuilder units.

Events

Toolbar event

Occurs

Clicked

Immediately after a toolbar item is tapped or clicked

Functions

Toolbar function

Datatype returned

Description

AddItem

Integer

Adds a toolbar item to the toolbar

AddPicture

Integer

Adds a picture to the toolbar picture array

DeleteItem

Integer

Removes a toolbar item from the toolbar

Destroy

Integer

Removes the toolbar

GetItem

Integer

Returns a toolbar item

GetItemPictureIndex

Integer

Returns the picture index that corresponds to the item index for the toolbar item

GetItemState

Integer

Returns the state of a toolbar item

InsertItem

Long

Inserts a toolbar item in the toolbar

SetItemPictureIndex

Integer

Specifies the picture to be used for a toolbar item

SetItemState

Boolean

Sets the state of a toolbar item





Copyright © 2004. Sybase Inc. All rights reserved. ToolbarItem object

View this book as PDF