dddw.property
property (DataWindow object)
Description
Properties that control the appearance and behavior of a column
with the DropDownDataWindow edit style.
Applies to
Column controls
Syntax
PowerBuilder dot notation:
|
1 |
dw_control.Object.columnname.dddw.property |
Describe and Modify argument:
|
1 |
"columnname.dddw.property { = value }" |
|
Parameter |
Description |
|---|---|
|
columnname |
The name of a column that has the |
|
property |
A property for the DropDownDataWindow column. |
|
value |
The value to be assigned to the property. For dddw |
|
Property for dddw |
Value |
|---|---|
|
AllowEdit |
Whether the user can type a value as well as choose Values Yes — Typing is allowed. No — Call GetChild after Painter: Allow Editing |
|
AutoHScroll |
Whether the DropDownDataWindow automatically Values are: Yes — (Default) No — Do not Painter: Auto Horizontal |
|
AutoRetrieve |
Whether the DropDownDataWindow data is retrieved Values Yes — (Default) Data is automatically No — Data must be retrieved Painter: AutoRetrieve |
|
Case |
The case of the text in the Values are: Any — Upper — Characters Lower — Characters Call GetChild after setting Painter: Case |
|
DataColumn |
A string whose value is the name of the data column Call GetChild after setting dddw.DataColumn Painter: Data Column option, |
|
DisplayColumn |
A string whose value is the name of the display Call GetChild after setting Painter: Display Column option, |
|
HScrollBar |
Whether a horizontal scroll bar displays in the Values are: Yes — No — Do not Painter: Horizontal |
|
HSplitScroll |
Whether the horizontal scroll bar is split. The Values Yes — Split the horizontal scroll bar so the No — The horizontal scroll bar is not Painter: Split Horizontal Scroll Bar |
|
Limit |
An integer from 0 to 32767 specifying the maximum Painter: |
|
Lines |
An integer from 0 to 32767 specifying the number of Painter: Lines in DropDown |
|
Name |
A string whose value is the name of the Call Painter: DataWindow |
|
NilIsNull |
Whether to set the data value of the Values are: Yes — Make the Empty No — Do not make the empty string Painter: Empty String is null |
|
PercentWidth |
An integer specifying the width of the drop-down Call GetChild after setting Painter: Width of DropDown |
|
Required |
Whether the column is required. Values Yes — Required. No — (Default) Painter: Required |
|
ShowList |
Whether the ListBox portion of the Values Yes — Display the list whenever the column has No — Do not display the list until the Painter: Always Show List |
|
UseAsBorder |
Whether a down arrow displays at the right end of Values are: Yes No — Do not display the Note that if ShowList is set to Yes, the Painter: Always Show Arrow |
|
VScrollBar |
Whether a vertical scroll bar displays in the Values Yes — Display a vertical scroll No — Do not display a vertical scroll Painter: Vertical Scroll Bar |
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:
|
1 2 3 4 |
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:
|
1 2 |
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
|
1 2 3 4 5 6 7 8 9 |
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") |