Adding some controls to a Pane and then adding Pane to ListView.
Need to set the TextField to FocusTraversable = false
Do not wish to add the Pane by LoadLayout as Tag is needed.
Is there a way to do this with Code?
Need to set the TextField to FocusTraversable = false
Do not wish to add the Pane by LoadLayout as Tag is needed.
B4X:
Sub AddToTable
For i = 0 To 15
Dim Pnl As Pane
Dim lbl1, lbl2, lbl3 As Label
Dim txt As TextField
lbl1.Initialize("lbs")
lbl2.Initialize("lbs")
lbl3.Initialize("lbs")
txt.Initialize("txt")
lbl1.Text = "First Col No: " & i
lbl1.Font = fx.DefaultFont(14)
lbl1.Style = "-fx-text-fill: Red;"
lbl1.Id = 1
lbl1.Tag = i
lbl2.Text = "Second Col No: " & i
lbl2.Font = fx.DefaultFont(14)
lbl2.Style = "-fx-text-fill: Purple;"
lbl2.Id = 2
lbl2.Tag = i
lbl3.Text = "Third Col No: " & i
lbl3.Font = fx.DefaultFont(14)
lbl3.Style = "-fx-text-fill: Blue;"
lbl3.Id = 3
lbl3.Tag = i
txt.Text = "IAS"
' txt.FocusTraversable = False ' How ?
txt.Id = 4
txt.Tag = i
Pnl.Initialize("pnl")
Pnl.Style = "-fx-background-color: #f0f0f0;"
Pnl.PrefHeight = 22
Pnl.Tag = i
Pnl.Id = 100 + i
Pnl.AddNode(lbl1, 0, 0, 150, 25)
Pnl.AddNode(lbl2, 150, 0, 150, 25)
Pnl.AddNode(lbl3, 300, 0, 150, 25)
Pnl.AddNode(txt, 450, 0, 103, 23)
BetTable.Items.Add(Pnl)
Next
Is there a way to do this with Code?