dddw.property

Description

Properties that control the appearance and behavior of a column with the DropDownDataWindow edit style.

Applies to

Column controls

Syntax

PowerBuilder dot notation:

dw_control.Object.columnname.dddw.property

Describe and Modify argument:

"columnname.dddw.property { = value }"

Parameter

Description

columnname

The name of a column that has the DropDownDataWindow edit style.

property

A property for the DropDownDataWindow column. Properties and their settings are listed in the table below.

value

The value to be assigned to the property. For dddw properties, value cannot be a DataWindow expression.


Property for dddw

Value

AllowEdit

Whether the user can type a value as well as choose from the DropDownDataWindow's list.

Values are:

Yes -- Typing is allowed.

No -- (Default) Typing is not allowed.

Call GetChild after setting dddw.AllowEdit to get a valid reference to the column's DropDownDataWindow.

Painter: Allow Editing option.

AutoHScroll

Whether the DropDownDataWindow automatically scrolls horizontally when the user enters or deletes data.

Values are:

Yes -- (Default) Scroll horizontally automatically.

No -- Do not scroll automatically.

Painter: Auto Horizontal Scroll option.

AutoRetrieve

Whether the DropDownDataWindow data is retrieved when the parent DataWindow data is retrieved.

Values are:

Yes -- (Default) Data is automatically retrieved.

No -- Data must be retrieved separately.

Painter: AutoRetrieve option.

AutoCompleteMode

The option that controls how automatic completion works for the DropDownDataWindow.

Values are:

None -- Disables automatic completion.

Suggest -- Displays the auxiliary list associated with the entered characters with one or more suggested completion strings. The entered characters are case-insensitive.

Append -- Appends the remainder of the most likely candidate string to the entered characters, highlighting the appended characters. The entered characters are case-insensitive.

SuggestAppend -- Enables both Suggest and Append options.

Note

1) When AllowEdit is set to No by default, the column ignores the AutoCompleteMode property and the option list never displays.

2) If you have added scripts to implement the auto-complete feature, for example, filtering data according to the input value in the EditChanged event, then you should not enable the AutoCompleteMode option.

3) If the Append option is enabled, the EditChanged event will be triggered twice. The first trigger occurs when the appended characters need to be deleted, and the second trigger occurs when the new input characters is populated.

Painter: AutoCompleteMode option.

Case

The case of the text in the DropDownDataWindow.

Values are:

Any -- Character of any case allowed.

Upper -- Characters converted to uppercase.

Lower -- Characters converted to lowercase.

Call GetChild after setting dddw.Case to get a valid reference to the column's DropDownDataWindow.

Painter: Case option.

DataColumn

A string whose value is the name of the data column in the associated DropDownDataWindow. Value is quoted.

Call GetChild after setting dddw.DataColumn to get a valid reference to the column's DropDownDataWindow.

Painter: Data Column option, visible after selecting a DataWindow.

DisplayColumn

A string whose value is the name of the display column in the associated DropDownDataWindow. Value is quoted.

Call GetChild after setting dddw.DisplayColumn to get a valid reference to the column's DropDownDataWindow.

Painter: Display Column option, visible after selecting a DataWindow.

HScrollBar

Whether a horizontal scroll bar displays in the DropDownDataWindow.

Values are:

Yes -- Display a horizontal scroll bar.

No -- Do not display a horizontal scroll bar.

Painter: Horizontal Scroll Bar option.

HSplitScroll

Whether the horizontal scroll bar is split. The user can adjust the split position.

Values are:

Yes -- Split the horizontal scroll bar so the user can scroll the display and data columns separately.

No -- The horizontal scroll bar is not split.

Painter: Split Horizontal Scroll Bar option.

Limit

An integer from 0 to 32767 specifying the maximum number of characters that can be entered in the DropDownDataWindow. Zero means unlimited.

Note that when AllowEdit is set to No by default, the column ignores the Limit property.

Painter: Limit option.

Lines

An integer from 0 to 32767 specifying the number of lines (values) to display in the DropDownDataWindow. This property does not apply in Web pages because the browser controls how the DropDownDataWindow displays.

Painter: Lines in DropDown option.

Name

A string whose value is the name of the DropDownDataWindow associated with the column.

Call GetChild after setting dddw.Name to get a valid reference to the column's DropDownDataWindow.

Painter: DataWindow option.

NilIsNull

Whether to set the data value of the DropDownDataWindow to null when the user leaves the edit box blank.

Values are:

Yes -- Make the Empty string null.

No -- Do not make the empty string null.

Painter: Empty String is null option.

PercentWidth

An integer specifying the width of the drop-down portion of the DropDownDataWindow as a percentage of the column's width. For example, 300 sets the display width to three times the column width.

Call GetChild after setting dddw.PercentWidth to get a valid reference to the column's DropDownDataWindow.

Painter: Width of DropDown option.

Required

Whether the column is required.

Values are:

Yes -- Required.

No -- (Default) Not required.

Painter: Required option.

ShowList

Whether the ListBox portion of the DropDownDataWindow displays when the column has focus. A down arrow does not display at the right end of the DropDownDataWindow when dddw.ShowList is yes.

Values are:

Yes -- Display the list whenever the column has the focus.

No -- Do not display the list until the user selects the column.

Painter: Always Show List option.

UseAsBorder

Whether a down arrow displays at the right end of the DropDownDataWindow.

Values are:

Yes -- Display the arrow.

No -- Do not display the arrow.

Note that if ShowList is set to Yes, the column ignores the UseAsBorder property and the arrow never displays.

Painter: Always Show Arrow option.

Validation

Whether to check if the value entered in the DropDownDataWindow exists in the dropdown list; and if the value does not exist, the user will be prompted to enter a different value.

Values are:

Yes -- Check if the value exists.

No -- Do not check if the value exists.

Painter: Validate value against dropdown choices option.

VScrollBar

Whether a vertical scroll bar displays in the DropDownDataWindow for long lists.

Values are:

Yes -- Display a vertical scroll bar.

No -- Do not display a vertical scroll bar.

Painter: Vertical Scroll Bar option.


Usage

DropDownDataWindows and GetChild

When you set some of the dddw properties, as noted in the table, references to the DropDownDataWindow become invalid. Call GetChild again after changing these properties to obtain a valid reference.

To retrieve a DropDownDataWindow when the AutoRetrieve property is set to "false", you can access the object data as follows:

DataWindowChild mgr_id
dw1.GetChild ("dept_head_id", mgr_id)
mgr_id.SetTransObject (SQLCA)
mgr_id.Retrieve ( )

You can also pass a retrieval argument for the retrieve on the child DataWindow object.

Doing a reset to clear the data

When a DropDownDataWindow is retrieved, its data is kept with its own Data Object. If you retrieve the DropDownDataWindow and then set the AutoRetrieve property on the parent to "false", the data for the child is not cleared on a reset and re-retrieve of the parent.

To clear data from a DropDownDataWindow, you must call Reset on the child DataWindow object:

dw1.GetChild ("dept_head_id", mgr_id)
mgr_id.reset ( )

In the painter

Select the control and set values in the Properties view, Edit tab, when Style Type is DropDownDW.

Examples

ls_data = dw1.Describe("emp_status.dddw.AllowEdit")
dw1.Modify("emp_status.dddw.Case='Any'")
dw1.Modify("emp_status.dddw.DataColumn='status_id'")
dw1.Modify("emp_status.dddw.Limit=30")
dw1.Modify("emp_status.dddw.Name='d_status'")
dw1.Modify("emp_status.dddw.PercentWidth=120")
dw1.Object.emp_status.dddw.Case = "Any"
string ls_data
ls_data = dw1.Object.emp_status.dddw.AllowEdit")