B4J Question Check type of Controls

micro

Well-Known Member
Licensed User
Longtime User
Hi to all
How do I know if a control is a ComboBox or TextField or CheckBox etc.?
I have a map with the names of some controls and I need to know the type.
Thanks
 

micro

Well-Known Member
Licensed User
Longtime User
but not work.
in my map i have this key ("Pastebox", Serialbox, Iptxt,.....)
How convert this in node?
Pastebox is ComboBox
Serialbox is CheckBox
Iptxt is TextField
 
Upvote 0

micro

Well-Known Member
Licensed User
Longtime User
Not work Erel
This is my map:
B4X:
mpset.Clear
mpset.Put(ComEthbox, 0)
mpset.Put(Serialbox, 0)
mpset.Put(Pastebox, 0)
mpset.Put(iptxt, "192.168.1.25")

and to follow the reading:
B4X:
dim n as Node
For i = 0 to mpset.Size - 1
    ' n = mpset.Get("Pastebox")
      n = mpset.Get(mpset.GetKeyAt(i))
      If n Is ComboBox Then
        Log("combobox")
      Else If n Is CheckBox Then
        Log("checkbox")
      .........
      Else
      End If
Next
 
Upvote 0
Top