Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

controls in a datawindow

Status
Not open for further replies.

tinac99

Programmer
Jan 17, 2002
58
0
0
US
Hi,

Does anybody know how I can loop through all the controls inside a datawindow - including, columnnames, text, computed fields, etc?

Thanks,

Tina
 
Hi,

to get all objects in the datawindow use this

<DW Control Name>.Object.DataWindow.Objects
or
<DW Control Name>.Describe("DataWindow.Objects")

both returns a TAB separated list of all objects.
eg. "emp_name~temp_street~tlabel_emp_name~tlabel_emp_street"

from there on you can extract all the names of objects from the returned string. To get the type of the objects use

<DW Control Name>.Describe("<objectname>.Type")
eg.
dw_1.Describe("emp_name.Type")

dot-notation doesn't work here if you do not know the objectnames during coding.

For PB8 and later (maybe PB7 but I only know for PB8 and above) you can click NEW in the IDE and from the opened window choose tools and than datawindow syntax.Than you get all possible dw-properties with the syntax for describe/modify and dot notation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top