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

FormComboBoxInsert – PB Docs 2022 – PowerBuilder Library

FormComboBoxInsert – PB Docs 2022

FormComboBoxInsert

PowerScript function

Description

Inserts a combobox type form field at the current text input
position in a RichTextEdit control. A combobox has a list of items in its
dropdown and text in its edit field. After a combobox is inserted, the
edit field shows the text. If a user clicks at the text, the combobox will
display with the list of items.

Applies to

RichTextEdit control

Syntax 1

Argument

Description

fieldText

The text that displays in the edit field of the
combobox.

items[]

The item options to display in the combobox when the user
clicks at the combobox field.

showDropDownArrow The option that decides whether the combobox’s dropdown
arrow is immediately shown after insertion.
emptyWidth The combobox’s width, in twips, when its edit field is
empty. If this parameter is omitted, a default width of 2000 twips
is used. For almost all units of measurement in the RichTextEdit
control, twips are used. Twip is a fabricated word meaning
twentieth of a point (pt).

Syntax 2

Argument

Description

items[]

String array. The item options to display in the combobox
when the user clicks at the combobox field.

selectedIndex The index of the item that displays in the edit field of
the combobox. If the index is 0, the edit field is empty. If the
index is n, the nth item in items[] displays in the edit
field.
showDropDownArrow Boolean. The option that decides whether the combobox’s
dropdown arrow is immediately shown after insertion.
emptyWidth The combobox’s width, in twips, when its edit field is
empty. If this parameter is omitted, a default width of 2000 twips
is used. For almost all units of measurement in the RichTextEdit
control, twips are used. Twip is a fabricated word meaning
twentieth of a point (pt).

Return value

Integer.

Returns a value greater than 0 if it succeeds and this value
represents the unique ID of the form field that was successfully inserted.
If any argument’s value is null, returns null. Returns -1 if an error
occurs.

Examples

This example inserts a combobox form field which shows “Display
name” in the edit field, and when the field is inserted, the dropdown list
shows “A”, “B”, and “C” options.

This example inserts a combobox form field which does not display
text in the edit field.


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