B4J Question How to pop up a listbox

B4JExplorer

Active Member
Licensed User
Longtime User
Hi,

I know how to set the focus to a listbox programmatically, in a UI app.

But how do you expand the listbox/combobox, so that the user can immediately scroll up and down, without having to manually select the listbox?
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Example ComboBox using JavaObject:

B4X:
Private cbItems As ComboBox
cbItems.Items.AddAll(Array("A", "B", "C"))
ComboShowItems(cbItems)

Sub ComboShowItems(cb As ComboBox)
  Dim jo As JavaObject = cb
  jo.RunMethod("show",Null)
End Sub
 
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
Works perfectly, thanks rwblinn.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…