Syntax 2: For positioning objects within a DataWindow
Description
Moves an object within the DataWindow to another band or changes
the front-to-back order of objects within a band.
Applies to
DataWindow controls and DataStores
Syntax
|
1 |
dwcontrol.SetPosition ( objectname, band, bringtofront ) |
|
Argument |
Description |
|---|---|
|
dwcontrol |
The name of the DataWindow control or DataStore |
|
objectname |
The name of the object within the DataWindow that you |
|
band |
The name of the band or layer in which you want to Layer names are background and foreground. Band names are detail, header, footer, summary, # is the group level number. Enter the empty string (“”) |
|
bringtofront |
A boolean indicating whether you want to bring
|
Return value
Integer.
Returns 1 when it succeeds and -1 if an error occurs. If any
argument’s value is null, SetPosition returns null.
Examples
This statement moves oval_red in dw_rpt to the header and brings
it to the front:
|
1 |
dw_rpt.SetPosition("oval_red", "header", TRUE) |
This statement does not change the position of oval_red , but does
bring it to the front:
|
1 |
dw_rpt.SetPosition("oval_red", "", TRUE) |
This statement moves oval_red to the footer but does not bring it
to the front:
|
1 |
dw_rpt.SetPosition("oval_red", "footer", FALSE) |