RibbonComboBoxItem control

A RibbonComboBoxItem control defines a combo box in the RibbonBar control. For more about the combo box, see the section called “Introduction to RibbonBar items” in Users Guide.

The RibbonComboBoxItem control is the child object of the RibbonPanelItem or RibbonGroupItem control (RibbonBar > Category > Panel > [Group >] ComboBox). For the hierarchical structure of the ribbon controls and how to get and set them, refer to the section called “Accessing the RibbonBar items in the hierarchy” in Users Guide.

Events

This control has no events. But you can create user events and bind them with this control. You can create the Modified user event, the Selected user event, and the SelectionChanged user event. For how to create the Modified user event, see Modified in PowerScript Reference; for how to create the Selected user event, see Selected in PowerScript Reference; for how to create the SelectionChanged user event, see SelectionChanged in PowerScript Reference.

Properties

RibbonComboBoxItem property

Datatype

Description

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

AllowEdit

Boolean

Specifies whether the user can enter text in the text box of the control.

AutoScale

Boolean

Specifies whether or not to automatically scale the width and height of the control according to the width and height of the content. (Default is TRUE.)

When this property is set to FALSE, the width and height of the control is determined by the Width, BoxWidth, and/or BoxHeight properties; if the Width, BoxWidth, and/or BoxHeight properties are set to 0 or not specified, the width and height is determined by the program.

AutoHScroll

Boolean

Specifies whether the control is automatically horizontal scrolling.

BoxHeight

Integer

Specifies the height of the box of the ribbon combo box in PowerBuilder units.

If the AutoScale property is set to True, this property will be ignored; if AutoScale is False and this property is set to an invalid value (such as 0), the width will be determined by the program.

BoxWidth

Integer

Specifies the width of the box of the ribbon combo box in PowerBuilder units. If you want to specify the width of the combo box (which is usually composed of the label, picture, and box), use the Width property.

If the AutoScale property is set to True, this property will be ignored; if AutoScale is False and this property is set to an invalid value (such as 0), the width will be determined by the program.

HScrollBar

Boolean

Specifies whether the control has a horizontal scroll bar.

Modified

String

Specifies the name of the modified user event to be bound with the control.

Enabled

Boolean

Specifies whether the control is enabled (can be clicked).

ItemHandle

Long

Identifies the handle associated with the item.

Label

String

Specifies the label of the control.

PictureName

String

Specifies the file name of the picture.

PictureHeight

Integer

Specifies in pixels the display height of all the pictures in the control.

PictureWidth

Integer

Specifies in pixels the display width of all the pictures in the control.

PowerTipText

String

Specifies the text to be displayed as a PowerTip for the item.

PowerTipDescription

String

Specifies the text to be displayed as a PowerTip description for the item.

Selected

String

Specifies the name of the selected user event to be bound with the control.

SelectionChanged

String

Specifies the name of the selection changed user event to be bound with the control.

Sorted

String

Specifies whether items in the combo box is sorted alphabetically.

Tag

String

Specifies the tag value assigned to the control.

Text

String

Specifies the text that displays in the text box of the control. The text for the ribbon combo box displays when the AllowEdit property is true.

Visible

Boolean

Specifies whether the control is visible. Values are:

TRUE -- Control is visible.

FALSE -- Control is not visible.

VScrollBar

Boolean

Specifies whether the control has a vertical scroll bar.

Width

Boolean

Specifies the width of the ComboBox control in PowerBuilder units (which is usually composed of the label, image, and box).


Functions

RibbonComboBoxItem function

Datatype returned

Description

AddItem

Integer

Adds a new item to the list of values in a combo box.

ClassName

String

Returns the name assigned to the control.

DeleteItem

Integer

Deletes an item from the list of values in a combo box.

FindItem

Integer

Finds the next item in a combo box that begins with the specified search text.

GetBoxPictureList

Integer

Gets the list of picture files that are set for the items in the combo box.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetParent

PowerObject

Returns a reference to the name of the parent object.

InsertItem

Integer

Inserts an item into the list of values in a combo box.

PostEvent

Integer

Adds the specified event to the end of the event queue for the specified object.

SelectedIndex

Integer

Gets the index of the currently selected item in the combo box.

SelectItem

Integer

Finds and highlights an item in the control.

SetBoxPictureList

Integer

Sets the picture files for the items in the combo box.

Text

String

Obtains the text of an item in a combo box.

TotalItems

Integer

Determines the total number of items in a combo box.

TriggerEvent

Integer

Triggers a specified event in the control and executes the script for the event.

TypeOf

Object

Returns the type of the control.