DropDownListBox control
A DropDownListBox control combines the features of a ListBox and a
SingleLineEdit. In some DropDownListBoxes, the user can select an item by
entering the name of the item in the text box. In other DropDownListBoxes,
the user cannot modify the text box and must click the item or enter the
first character of the item to select it.
Making the list display
In the development environment, if the list portion of the
DropDownListBox is not displayed because ShowList is set to FALSE, the
user must click the down arrow at the end of the text box to display
it.
Properties
|
DropDownListBox property |
Datatype |
Description |
|---|---|---|
|
Integer |
The ASCII value of the accelerator key you want to |
|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Boolean |
Specifies whether the user can enter text in the TRUE — FALSE — Cannot AllowEdit must be true |
|
|
Boolean |
Specifies whether the text box portion of the TRUE — TextBox scrolls FALSE — TextBox does |
|
|
Long |
Specifies the numeric value of the background |
|
|
Boolean |
Specifies whether the control has a border. |
|
|
BorderStyle (enumerated) |
Specifies the style of the border of the control. StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Boolean |
Specifies whether PowerBuilder will move the TRUE — Control moved to FALSE — Control not moved to |
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — FALSE — When the control is clicked, the |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the control is enabled (can be TRUE — Control is FALSE — Control is not |
|
|
String |
Specifies the name of the typeface in which the |
|
|
FontCharSet (enumerated) |
Specifies the font character set used for the text |
|
|
FontFamily (enumerated) |
Specifies the font family (type style) used for the AnyFont! Decorative! Modern! Roman! Script! Swiss! |
|
|
FontPitch (enumerated) |
Specifies the pitch (spacing) of the font used for Default! Fixed! Variable! |
|
|
Integer |
Specifies the height of the control, in |
|
|
Boolean |
Specifies whether a horizontal scroll bar is TRUE — FALSE — |
|
|
ImeMode |
Integer |
Specifies the input method editor mode. This |
|
Boolean |
Specifies whether the text in the control is TRUE — Text is FALSE — Text is not italic |
|
|
String array |
Specifies the contents of the ListBox portion of |
|
|
Integer |
Specifies the maximum number of characters (0 to |
|
|
String |
Specifies the name of the stock pointer or the file |
|
|
Boolean |
Specifies that characters should be displayed in TRUE — Characters display in right-to-left FALSE — Characters display in left-to-right |
|
|
Boolean |
Specifies whether the option list always displays TRUE — Option list always FALSE — Option list displays only when This property is |
|
|
Boolean |
Specifies whether the ListBox portion of the TRUE — ListBox automatically FALSE — ListBox not sorted. |
|
|
Integer |
Specifies the tab value of the control within the |
|
|
String |
Specifies the tag value assigned to the |
|
|
String |
Specifies the text in the control. |
|
|
Long |
Specifies the numeric value of the color used for |
|
|
Integer |
Specifies the size of the text in the control, in |
|
|
Boolean |
Specifies whether the text in the control is TRUE — Text is FALSE — Text is not |
|
|
Boolean |
Specifies whether the control is visible. Values TRUE — Control is visible. FALSE |
|
|
Boolean |
Specifies whether a vertical scroll bar is TRUE — FALSE — Vertical |
|
|
Integer |
Specifies the stroke weight of the text in the |
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
Events
|
DropDownListBox event |
Occurs |
|---|---|
|
Immediately before the Open event occurs in the |
|
|
Immediately after the Close event occurs in the |
|
|
When the control is double-clicked (selected and |
|
|
When a dragged control is dropped on the |
|
|
When a dragged control enters the |
|
|
When a dragged control leaves the |
|
|
When a dragged control is within the |
|
|
Just before the control receives focus (before it |
|
|
When the user presses the F1 key or drags the |
|
|
When the control loses focus (becomes |
|
|
When the control loses focus, the text has been |
|
|
When a Windows message occurs that is not a |
|
|
When the right mouse button is pressed on the |
|
|
When an item is selected in the ListBox portion of |
Functions
|
DropDownListBox function |
Datatype returned |
Description |
|---|---|---|
|
Integer |
Adds a new item to the end of the ListBox portion The AddItem function does not update |
|
|
String |
Returns the name assigned to the |
|
|
Integer |
Clears the selected text from the control (but does |
|
|
Integer |
Copies (but does not delete) the selected text from |
|
|
Integer |
Cuts (deletes) the selected text (if any) from the |
|
|
Integer |
Deletes the item indicated by the index from the |
|
|
Boolean |
Populates the ListBox portion of the |
|
|
Boolean |
Retrieves the current selection from the specified |
|
|
Integer |
Starts or ends the dragging of the |
|
|
Integer |
Finds the first item in the ListBox portion of the |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Integer |
Makes the control invisible |
|
|
Integer |
Adds a new item to the ListBox portion of the |
|
|
Integer |
Moves the control to a specified |
|
|
Integer |
Inserts the contents of the clipboard (if any) at |
|
|
Integer |
Returns the distance of the pointer from the left |
|
|
Integer |
Returns the distance of the pointer from the top of |
|
|
Integer |
Returns the position of the cursor in the |
|
|
Boolean |
Adds an event to the end of the message queue for |
|
|
Integer |
Prints the control. |
|
|
Integer |
Replaces the selected text in the control with the |
|
|
Integer |
Deletes all items from the control. |
|
|
Integer |
Changes the size of the control. |
|
|
Integer |
Returns the length of the selected text in the |
|
|
Integer |
Returns the starting position of the selected text |
|
|
String |
Returns a string containing the selected text (if |
|
|
Integer |
Finds and highlights an item in the control. Use |
|
|
Integer |
Selects the text in the control specified by the |
|
|
Integer |
Sets focus in the first item in the |
|
|
Integer |
Specifies the position of the control in the |
|
|
Integer |
Controls automatic redrawing of the control after |
|
|
Integer |
Makes the control visible. |
|
|
String |
Returns the text of the item in the ListBox portion |
|
|
Integer |
Returns the total number of items in the ListBox |
|
|
Integer |
Triggers a specified event in the control and |
|
|
Control |
Returns the type of the control. |