Android Question How to initialize B4XComboBox correctly

Creideiki

Active Member
Licensed User
Longtime User
Hi,

I try to use a B4XComboBox in a CustomLayoutDialog:
B4X:
    Dim spMonat As B4XComboBox
    spMonat.Initialize(Me, "spMonat")
    spMonat.SetItems(DateUtils.GetMonthsNames)
    DialogPanel.AddView(spMonat.mbase, 110dip, 10dip, 160dip, 50dip)

The SetItems crashes with "java.lang.RuntimeException: Object should first be initialized (Spinner).".

How do I initialize the B4XComboBox correctly? I don't want to create a layout since I have only three controls in the Box...
 

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 1

Creideiki

Active Member
Licensed User
Longtime User
Well... since one should add even a single Custom View as a layout it seems I really should create a layout... ?
 
Upvote 0
Top