dddw.property DataWindow object property
Description
Properties that control the appearance and behavior of a column
with the DropDownDataWindow edit style.
Controls
Column controls
Syntax
PowerBuilder dot notation:
1 |
<span>dw_control</span>.Object.<span>columnname</span>.dddw.<span>property</span> |
Describe and Modify argument:
1 |
"<span>columnname</span>.dddw.<span>property </span>{ = <span>value </span>}" |
Parameter |
Description |
---|---|
columnname |
The name of a column that has the DropDownDataWindow |
property |
A property for the DropDownDataWindow |
value |
The value to be assigned to the property. |
Property for dddw |
Value |
---|---|
AllowEdit |
Whether the user can type a value as Values are:
Call GetChild after setting dddw.AllowEdit Painter: Allow Editing option. |
AutoHScroll |
Whether the DropDownDataWindow automatically Values are:
Painter: Auto Horizontal Scroll option. |
AutoRetrieve |
Whether the DropDownDataWindow data is Values are:
Painter: AutoRetrieve option. |
Case |
The case of the text in the DropDownDataWindow. Values are:
Call GetChild after setting dddw.Case Painter: Case option. |
DataColumn |
A string whose value is the name of the Call GetChild after setting dddw.DataColumn Painter: Data Column option, visible after selecting a DataWindow. |
DisplayColumn |
A string whose value is the name of the Call GetChild after setting dddw.DisplayColumn Painter: Display Column option, visible after selecting a |
HScrollBar |
Whether a horizontal scroll bar displays Values are:
Painter: Horizontal Scroll Bar option. |
HSplitScroll |
Whether the horizontal scroll bar is Values are:
Painter: Split Horizontal Scroll Bar option. |
Limit |
An integer from 0 to 32767 specifying Painter: Limit option. |
Lines |
An integer from 0 to 32767 specifying Painter: Lines in DropDown option. |
Name |
A string whose value is the name of the Call GetChild after setting Painter: DataWindow option. |
NilIsNull |
Whether to set the data value of the Values are:
Painter: Empty String is null option. |
PercentWidth |
An integer specifying the width of the Call GetChild after setting Painter: Width of DropDown option. |
Required |
Whether the column is required. Values are:
Painter: Required option. |
ShowList |
Whether the ListBox portion of the DropDownDataWindow Values are:
Painter: Always Show List option. |
UseAsBorder |
Whether a down arrow displays at the Values are:
Note that if ShowList is set to Yes, the column ignores the Painter: Always Show Arrow option. |
VScrollBar |
Whether a vertical scroll bar displays Values are:
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:
1 |
DataWindowChild mgr_id |
1 |
dw1.GetChild ("dept_head_id", mgr_id) |
1 |
mgr_id.SetTransObject (SQLCA) |
1 |
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 |
dw1.GetChild ("dept_head_id", mgr_id) |
1 |
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 |
ls_data = dw1.Describe("emp_status.dddw.AllowEdit") |
1 |
dw1.Modify("emp_status.dddw.Case='Any'") |
1 |
dw1.Modify("emp_status.dddw.DataColumn='status_id'") |
1 |
dw1.Modify("emp_status.dddw.Limit=30") |
1 |
dw1.Modify("emp_status.dddw.Name='d_status'") |
1 |
dw1.Modify("emp_status.dddw.PercentWidth=120") |
1 |
dw1.Object.emp_status.dddw.Case = "Any" |
1 |
string ls_data |
1 |
ls_data = dw1.Object.emp_status.dddw.AllowEdit") |