Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

DropDownPictureListBox control – PB Docs 2019 – PowerBuilder Library

DropDownPictureListBox control – PB Docs 2019

DropDownPictureListBox control

A DropDownPictureListBox control is similar to a DropDownListBox,
but with the addition of pictures associated with the items in the
list.

The pictures used in this control can be bitmaps (BMP file), icons
(ICO file), cursors (CUR file), GIF (but not animated GIF) files, or JPEG
files.

Making the list display

In the development environment, if the list portion of the
DropDownPictureListBox 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

DropDownPicture ListBox property

Datatype

Description

Accelerator

Integer

The ASCII value of the accelerator key you want to
assign as the accelerator for the control.

AccessibleDescription

String

A description of the control and/or its purpose for
use by accessibility tools such as readers for visually impaired
users.

AccessibleName

String

A label that briefly describes the control, such as
the text in a button or the name of a menu item.

AccessibleRole

AccessibleRole (enumerated)

Describes what kind of user interface element the
control is.

AllowEdit

Boolean

Specifies whether the user can enter text in the
text box portion of the control. Values are:

TRUE —
Can enter text in the text box.

FALSE — Cannot
enter text in the text box.

AllowEdit must be true
when ShowList is true.

AutoHScroll

Boolean

Specifies whether the text box portion of the
control scrolls horizontally automatically when data is entered
or deleted. Values are:

TRUE — Text box scrolls
horizontally automatically.

FALSE — Text box does
not scroll horizontally automatically.

BackColor

Long

Specifies the numeric value of the background
color: -2 to 16,777,215. For more information about color, see
the section called “RGB” in PowerScript Reference.

Border

Boolean

Specifies whether the control has a border. Note
that setting this property to FALSE has no effect on the
control; it always has a border. Values are:

TRUE —
Control has a border.

FALSE — Not
applicable.

BorderStyle

BorderStyle (enumerated)

Specifies the style of the border of the control.
Values
are:

StyleBox!

StyleLowered!

StyleRaised!

StyleShadowBox!

BringToTop

Boolean

Specifies whether PowerBuilder will move the
control to the top of the front-to-back order in the window.
Values are:

TRUE — Control moved to
top.

FALSE — Control not moved to
top.

ClassDefinition

PowerObject

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

DragAuto

Boolean

Specifies whether PowerBuilder puts the control
automatically into Drag Mode. Values are:

TRUE —
When the control is clicked, the control is automatically in
Drag Mode.

FALSE — When the control is clicked, the
control is not automatically in Drag Mode. You have to manually
put the control into Drag Mode by using the Drag
function.

DragIcon

String

Specifies the name of the stock icon or the file
containing the icon you want to display when the user drags the
control (the ICO file). The default icon is a box the size of
the control.

When the user drags the control, the
icon displays when the control is over an area in which the
control can be dropped (a valid drop area). When the control is
over an area that is not a valid drop area, the No-Drop icon
displays.

Enabled

Boolean

Specifies whether the control is enabled (can be
selected). Values are:

TRUE — Control is
enabled.

FALSE — Control is not
enabled.

FaceName

String

Specifies the name of the typeface in which the
text of the control displays (for example, arial or
courier).

FontCharSet

FontCharSet (enumerated)

Specifies the font character set used for the text
in the control. The application must be running on an
appropriate version of PowerBuilder under an operating system
that supports the selected character set. For a complete list of
possible values, see the list of properties for the FontCharSet
variable on the Enumerated tab page of the
Browser.

FontFamily

FontFamily (enumerated)

Specifies the font family (type style) used for the
text in the control. Values
are:

AnyFont!

Decorative!

Modern!

Roman!

Script!

Swiss!

FontPitch

FontPitch (enumerated)

Specifies the pitch (spacing) of the font used for
the text in the control. Values
are:

Default!

Fixed!

Variable!

Height

Integer

Specifies the height of the control, in
PowerBuilder units.

HScrollBar

Boolean

Specifies whether a horizontal scroll bar is
displayed in the control. Values are:

TRUE —
Horizontal scroll bar is displayed.

FALSE —
Horizontal scroll bar is not displayed.

ImeMode

Integer

Specifies the input method editor mode. This
property is relevant only to applications running on a Japanese
version of PowerBuilder.

Italic

Boolean

Specifies whether the text in the control is
italic. Values are:

TRUE — Text is
italic.

FALSE — Text is not italic.

Item[ ]

String array

Specifies the initial item strings in the ListBox
portion of the DropDownPictureListBox. This array is not updated
after initialization.

ItemPictureIndex[
]

Integer

Initial picture index for each item in the Item
property array. These values are not updated after
initialization.

Limit

Integer

Specifies the maximum number of characters (0 to
32,767) the user can enter in the SingleLineEdit portion of the
DropDownPictureListBox (0 means unlimited).

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.

PictureMaskColor

Long

Specifies the numeric value of the color to be used
to mask user-defined bitmaps added through the initial picture
array or with the AddPicture function. System-defined bitmaps
know their mask color and this color is ignored. This value is
used when a picture is added, and therefore can be changed
between AddPicture calls.

Values can be: -2 to
16,777,215.

For more information about color, see
the section called “RGB” in PowerScript Reference.

PictureName[
]

String

Specifies the names of the files containing the
pictures added during initialization. The file extension BMP,
ICO, GIF, JPG, or JPEG is required.

This property is
not updated after initialization.

PictureWidth

Integer

Specifies the width 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.

Pointer

String

Specifies the name of the stock pointer or the file
containing the pointer that will be used for the
control.

RightToLeft

Boolean

Specifies that characters should be displayed in
right-to-left order. The application must be running on an
operating system that supports right-to-left display. Values
are:

TRUE — Characters display in right-to-left
order.

FALSE — Characters display in left-to-right
order.

ShowList

Boolean

Specifies whether the option list always displays
in the ListBox portion of the DropDownPictureListBox when the
control displays. Values are:

TRUE — Option list
always displays.

FALSE — Option list displays only
when the user clicks the down arrow.

This property
is usually set to false. AllowEdit must be true when ShowList is
true.

Sorted

Boolean

Specifies whether the ListBox portion of the
DropDownPictureListBox is automatically sorted in ascending
order. Values are:

TRUE — ListBox automatically
sorted.

FALSE — ListBox not sorted.

TabOrder

Integer

Specifies the tab value of the control within the
window (0 means the user cannot tab to the
control).

Tag

String

Specifies the tag value assigned to the
control.

Text

String

Specifies the text in the control.

TextColor

Long

Specifies the numeric value of the color used for
text: -2 to 16,777,215. For more information about color, see
the section called “RGB” in PowerScript Reference.

TextSize

Integer

Specifies the size of the text in the control, in
points. For backward compatibility, the size is stored as a
negative number; for example, 10-point text size is stored as
-10.

Underline

Boolean

Specifies whether the text in the control is
underlined. Values are:

TRUE — Text is
underlined.

FALSE — Text is not
underlined.

Visible

Boolean

Specifies whether the control is visible. Values
are:

TRUE — Control is visible.

FALSE
— Control is not visible.

VScrollBar

Boolean

Specifies whether a vertical scroll bar is
displayed in the control. Values are:

TRUE —
Vertical scroll bar is displayed.

FALSE — Vertical
scroll bar is not displayed.

Weight

Integer

Specifies the stroke weight of the text in the
control; for example, 400 for normal or 700 for
bold.

Width

Integer

Specifies the width of the control, in PowerBuilder
units.

X

Integer

Specifies the X position (the distance from the
left edge of the window), in PowerBuilder units.

Y

Integer

Specifies the Y position (the distance from the top
of the window), in PowerBuilder units.

Events

DropDownPicture ListBox event

Occurs

Constructor

Immediately before the Open event occurs in the
window.

Destructor

Immediately after the Close event occurs in the
window.

DoubleClicked

When the control is double-clicked (selected and
activated).

DragDrop

When a dragged control is dropped on the
control.

DragEnter

When a dragged control enters the
control.

DragLeave

When a dragged control leaves the
control.

DragWithin

When a dragged control is within the
control.

GetFocus

Just before the control receives focus (before it
is selected and becomes active).

Help

When the user presses the F1 key or drags the
context help button (question mark) from the title bar to a menu
item or control.

LoseFocus

When the control loses focus (becomes
inactive).

Modified

When the control loses focus, the text has been
changed, and enter or tab is pressed.

Other

When a Windows message occurs that is not a
PowerBuilder event.

RButtonDown

When the right mouse button is pressed on the
control.

SelectionChanged

When an item is selected in the ListBox portion of
the DropDownPictureListBox.

Functions

DropDownPicture ListBox function

Datatype returned

Description

AddItem

Integer

Adds a new item to the end of the ListBox portion
of the control.

The AddItem function does not update
the Item[ ] or ItemPictureIndex[ ] properties of this
control.

AddPicture

Integer

Adds the bitmap, icon, or cursor file to the main
image list. This function does not update the PictureName[ ]
property.

ClassName

String

Returns the name assigned to the
control.

Clear

Integer

Clears the selected text from the control (but does
not place it in the clipboard).

Copy

Integer

Copies (but does not delete) the selected text from
the control to the clipboard.

Cut

Integer

Cuts (deletes) the selected text (if any) from the
control and places it in the clipboard.

DeleteItem

Integer

Deletes the item indicated by the index from the
ListBox portion of the control.

DeletePicture

Integer

Deletes the specified picture from the image list.
This function does not update the PictureName[ ]
property.

DeletePictures

Integer

Deletes all the pictures from the image list. This
function does not update the PictureName[ ]
property.

DirList

Boolean

Populates the ListBox portion of the
DropDownPictureListBox with a list of the files of the specified
type that match the specified file pattern.

DirSelect

Boolean

Retrieves the current selection from the specified
control and puts it in the specified variable.

Drag

Integer

Starts or ends the dragging of the
control.

FindItem

Integer

Finds the first item in the ListBox portion of the
control (after the specified index) that begins with a specified
string.

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.

Hide

Integer

Makes the control invisible
(hidden).

InsertItem

Integer

Adds a new item to the ListBox portion of the
DropDownPictureListBox before the item indicated by the
index.

This function does not update the Item[ ] or
ItemPictureIndex[ ] properties of this control.

Move

Integer

Moves the control to a specified
location.

Paste

Integer

Inserts the contents of the clipboard (if any) at
the cursor location in the control.

PointerX

Integer

Returns the distance of the pointer from the left
edge of the control.

PointerY

Integer

Returns the distance of the pointer from the top of
the control.

Position

Integer

Returns the position of the cursor in the
control.

PostEvent

Boolean

Adds an event to the end of the message queue for
control.

Print

Integer

Prints the control.

ReplaceText

Integer

Replaces the selected text in the control with the
specified string.

Reset

Integer

Deletes all items from the control.

Resize

Integer

Changes the size of the control.

SelectedLength

Integer

Returns the length of the selected text in the
control.

SelectedStart

Integer

Returns the starting position of the selected text
(if any) in the control.

SelectedText

String

Returns a string containing the selected text (if
any) from the control (the AllowEdit property must be
true).

SelectItem

Integer

Finds and highlights an item in the control. Use
Syntax 1 when you know the text of the item but not its
position. Use Syntax 2 when you know the position of the item in
the control’s list or you want to clear the current
selection.

SelectText

Integer

Selects the text in the control specified by the
starting position and length; when the control has focus,
highlights the text.

SetFocus

Integer

Sets focus in the first item in the
box.

SetPosition

Integer

Specifies the position of the control in the
front-to-back order of the window.

SetRedraw

Integer

Controls automatic redrawing of the control after
each change in its properties.

Show

Integer

Makes the control visible.

Text

String

Returns the text of the item in the ListBox portion
of the DropDownPictureListBox identified by the
index.

TotalItems

Integer

Returns the total number of items in the ListBox
portion of the DropDownPictureListBox.

TriggerEvent

Integer

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

TypeOf

Control

Returns the type of the control.


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