Working with the central DataWindow controls
The DataWindow controls with special names are the heart of a
form. It is in these controls that users manipulate the data in the
form.
You need to understand:
-
How the freeform DataWindow is sized in the form
-
How to retrieve data into the control in the form
How the freeform DataWindow is
sized
All form styles you build contain a freeform DataWindow (as do all
the built-in styles). Regardless of what size you specify for the
freeform DataWindow control in the Window painter in PowerBuilder, the
freeform DataWindow fills the entire form in the Form painter in
InfoMaker. InfoMaker enlarges the freeform DataWindow so that users can
place data (such as computed fields) anywhere in the form.
This means that a window background color that you specify in
PowerBuilder is ignored in the form.
Retrieving rows into the central DataWindow
control
When an InfoMaker user runs a form, InfoMaker automatically
populates the SQLCA Transaction object with the correct values, so you
do not have to do that in a script. To retrieve rows into the central
DataWindow control, all you have to do is set the Transaction object for
the control and then retrieve rows.
For example, to retrieve data into the control named dw_freeform,
code:
|
1 2 |
dw_freeform.SetTransObject(SQLCA) dw_freeform.Retrieve() |
You would code this in the window’s Open event to present the data
to the user when the form opens.
For more information about Transaction objects, see Using Transaction
Objects.