Sorry to ask so many questions but the deeper you get in to this amazing program suite the number of questions increases ! I wan't to set button text property from code when data changes in a SqLite table. The buttons are created in designer. I know this can be done in a class creating buttons at run-time but this make's it trickier with correct placing the buttons on a Pane. Why is the TEXT property not exposed when getting a node as in code below ?
Is it doable ?
Any help appreciated
B4X:
Sub SetButtonText
'### Update button text when record changes ###
Dim x As Int = 0
Dim tmpSQL As String
Dim ls As List
ls.Initialize
tmpSQL = "Select * FROM RF_codes"
Dim rs As ResultSet = SQL1.ExecQuery(tmpSQL)
Do While rs.NextRow
ls.Add(rs.GetString("Device")) ' add Button text from table to list
Loop
For Each n As Node In Pane_selectButton.GetAllViewsRecursive
If n Is Button Then' set Button text from list
n.TEXT = ls.Get(x)' NO SUCH PROPERTY TEXT! Workaround ??
Log(n.Tag)
x=x+1
End If
Next
End Sub
Is it doable ?
Any help appreciated