shakeshuck
Member
I wish to add multiple copies of a layout in a pane:
The layout might contain 10+ controls.
The problem is I then need to identify events fired from (in this example) TextFields within the layout.
I can see from the TicTacToe example that I can use Sender to identify the control, but in order to identify where in the array it is I need to set either a Tag for each control in the Layout, or ideally a Tag on the control's parent pane (so I can have multiple controls identified by one Tag)
Unfortunately I can't work out how to set a Tag on the Layout's pane once loaded, or how to get to the control's parent in order to read the Tag.
Can someone please point me in the right direction, or at the appropriate documents?
B4X:
Sub Process_Globals
Private Pane1 As Pane
Private MultiPane As Pane
Private MultiText As TextField
Private SelectionTable(25) As Pane
End Sub
Sub AppStart (Form1 As Form, Args() As String)
...
SelectionTable(0).Initialize("")
SelectionTable(0).LoadLayout("MultiLayout")
Pane1.AddNode(SelectionTable(0), 0, 0, 300, 100)
SelectionTable(1).Initialize("")
SelectionTable(1).LoadLayout("MultiLayout")
Pane1.AddNode(SelectionTable(1), 0, 100, 300, 100)
MainForm.Show
End Sub
The layout might contain 10+ controls.
The problem is I then need to identify events fired from (in this example) TextFields within the layout.
I can see from the TicTacToe example that I can use Sender to identify the control, but in order to identify where in the array it is I need to set either a Tag for each control in the Layout, or ideally a Tag on the control's parent pane (so I can have multiple controls identified by one Tag)
Unfortunately I can't work out how to set a Tag on the Layout's pane once loaded, or how to get to the control's parent in order to read the Tag.
Can someone please point me in the right direction, or at the appropriate documents?