iOS Question Add Item to B4XComboBox in B4i?

MrKim

Well-Known Member
Licensed User
Longtime User
I am trying to use B4XComboBox. I figured out how to use it in B4A and B4J (Both evidently different) but I can't figure it out For B4i.
I always feels like I must be missing something obvious.
XUI Views 1.51

B4X:
Sub Class_Globals
    Private PortNumCmbo As B4XComboBox
.
.
.

        #IF B4A
             PortNumCmbo.cmbBox.Add(MP.DCUTs.smgr.Get("PortNum"))
        #ELSE IF B4J
            PortNumCmbo.cmbBox.Items.Add(MP.DCUTs.smgr.Get("PortNum"))
        #Else
            PortNumCmbo.????
        #End If
 

MrKim

Well-Known Member
Licensed User
Longtime User
You have the SetItems (Items As List), you need to generate a List and set it with SetItems.
It is similar to AddAll.
This works for all three platforms.
So B4A and B4J allow me to add an item and B4i does not? This makes it very difficult to write cross platform code.
Thanks for letting me know.
 
Upvote 0
Top