iOS Question B4XCombobox does not appear (empty)

anbrik

Member
Licensed User
Hi!
I try to implement B4XComboBox and it doesn't appear:

B4X:
Sub Class_Globals
    Private cbLanguage As B4XComboBox
End Sub

Private Sub B4XPage_Created (Root1 As B4XView)
    B4XPages.GetManager.LogEvents = True
    
    Root = Root1
    Root.LoadLayout("PageSettings")
    
    Languages
End Sub

Private Sub Languages()
    cbLanguage.SetItems(Array("Kazakh", "Russian", "English"))
    Log("Creating ComboBox")
End Sub

cbLanguage is initialized in Designer.

Where am I wrong?
 
Last edited:

anbrik

Member
Licensed User
Image-1.jpg
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Sorry, but without seeing your project it is impossible to give a concrete advice.
The most efficient to help you would be if you posted your project or a small one showing the problem as a zip file.
Then we can see what exactly you have done and how and find a solution.
 
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
B4X:
Private Sub Languages()
    Dim ListLanguages As List
    ListLanguages.Initialize
    ListLanguages.Clear
    ListLanguages.Add("Kazakh")
    ListLanguages.Add("Russian")
    ListLanguages.Add("English")
    cbLanguage.SetItems(ListLanguages)
    Log("Creating ComboBox")
End Sub
 
Upvote 0

anbrik

Member
Licensed User
Thank you all, guys, for ideas!
I found my mistake. And @klaus indicated in his message that I should expand my search and check all subroutines. My mistake was to put the output of layout with combobox into B4XPage_resize and not in B4XPage_Created.
 
Upvote 0
Top