alvechurchdata
Programmer
I need to generate a table holding the full names of all the controls on all the forms in an app. By full names I mean something like:
[TT]
...
frmOrder.pgfOrders.pagDetails.grdDetails.colType
frmOrder.pgfOrders.pagDetails.grdDetails.colType.hdrType
frmOrder.pgfOrders.pagDetails.grdDetails.colType.opgType
frmOrder.pgfOrders.pagDetails.grdDetails.colType.opgType.optAir
frmOrder.pgfOrders.pagDetails.grdDetails.colType.opgType.optSea
...
[/TT]
I thought it would be a straightforward case of working through the objName and parent fields of the myForm.scx table recursively but it's more difficult than it seems.
I can get the simple controls but some containers are a problem. An example, Option Buttons aren't listed as separate records in myForm.scx; their details are inside the Properties field of their Option Group. Like this:
The same applies to other collections like columns in a grid and pages in a pageframe. The columns of a grid are listed in the properties field but headers and text boxes exist as individual entries in the table.
It's messy so before I settle down to write the code, can anyone suggest an easier way of getting the list that I need?
Geoff Franklin
[TT]
...
frmOrder.pgfOrders.pagDetails.grdDetails.colType
frmOrder.pgfOrders.pagDetails.grdDetails.colType.hdrType
frmOrder.pgfOrders.pagDetails.grdDetails.colType.opgType
frmOrder.pgfOrders.pagDetails.grdDetails.colType.opgType.optAir
frmOrder.pgfOrders.pagDetails.grdDetails.colType.opgType.optSea
...
[/TT]
I thought it would be a straightforward case of working through the objName and parent fields of the myForm.scx table recursively but it's more difficult than it seems.
I can get the simple controls but some containers are a problem. An example, Option Buttons aren't listed as separate records in myForm.scx; their details are inside the Properties field of their Option Group. Like this:
Code:
ButtonCount = 2
Value = 1
Height = 46
Left = 59
Top = 20
Width = 71
Name = "Optiongroup1"
optAir.Caption = "Air"
optAir.Value = 1
optAir.Height = 17
optAir.Left = 5
optAir.Top = 5
optAir.Width = 61
optAir.Name = "optAir"
optSea.Caption = "Sea"
optSea.Height = 17
optSea.Left = 5
optSea.Top = 24
optSea.Width = 61
optSea.Name = "optSea"
It's messy so before I settle down to write the code, can anyone suggest an easier way of getting the list that I need?
Geoff Franklin