I am stuck on a syntax question. I have a tab panel with several pushbuttons. From the main window I would like to reference the buttons. I looked at the man page for tabpanel the syntax I was looking for.
I tried
tabpanel1.firsttab.button.Caption = “string”
Where can I find a syntax example for this in the LRM?
If you really do need to identify all the controls that are tied to a specific index on a TabPanel, this code will do it:
Function ControlsOnTabPanel(panel As TabPanel, panelIndex As Integer) As RectControl()
dim r() as RectControl
dim w as Window = panel.Window
dim lastIndex as integer = w.ControlCount - 1
for i as integer = 0 to lastIndex
dim c as Control = w.Control( i )
if c IsA RectControl then
dim rControl as RectControl = RectControl( c )
if rControl.Parent = panel and rControl.PanelIndex = panelIndex then
r.Append rControl
end if
end if
next
return r
End Function
It will return an array of RectControl. From there, you can find the control or controls your need by looping through them, or you can refine this code with Introspection or something.