C Creideiki Active Member Licensed User Longtime User Dec 6, 2021 #1 Hi, I try to use a B4XComboBox in a CustomLayoutDialog: B4X: Copy 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...
Hi, I try to use a B4XComboBox in a CustomLayoutDialog: B4X: Copy 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 Dec 6, 2021 #2 [B4X] I need 100 <custom view here>s. How to add programmatically? Custom views are designed to be added with the designer. It is however very simple to create a layout file with the custom view and load it multiple times. Tip: remove the call to AutoScaleAll from the designer script. Complete example: Sub Globals Private B4XSwitch1 As B4XSwitch End... www.b4x.com Upvote 1
[B4X] I need 100 <custom view here>s. How to add programmatically? Custom views are designed to be added with the designer. It is however very simple to create a layout file with the custom view and load it multiple times. Tip: remove the call to AutoScaleAll from the designer script. Complete example: Sub Globals Private B4XSwitch1 As B4XSwitch End... www.b4x.com
C Creideiki Active Member Licensed User Longtime User Dec 6, 2021 #3 Well... since one should add even a single Custom View as a layout it seems I really should create a layout... ? Upvote 0
Well... since one should add even a single Custom View as a layout it seems I really should create a layout... ?