Android Question How to set B4XComboBox Items gravity?

Cableguy

Expert
Licensed User
Longtime User
Hi guys,

The tittle kinda says it all... I would like to center the items in the dropdown
 
Solution
The tittle kinda says it all... I would like to center the items in the dropdown
You can use an array of CSBuilders:
Code: Copy
lstItems.Initialize
    Dim cs As CSBuilder
    lstItems.AddAll(Array As Object(cs.Initialize.Alignment("ALIGN_CENTER").Color(xui.Color_Red).Append("Paris").PopAll, _
    cs.Initialize.Alignment("ALIGN_CENTER").Color(xui.Color_Magenta).Append("Lisbonne").popall, _
    cs.Initialize.Alignment("ALIGN_CENTER").Color(Colors.White).BackgroundColor(Colors.red).Append("Madrid").PopALL))    
    B4XComboBox2.SetItems(lstItems)
The tittle kinda says it all... I would like to center the items in the dropdown
You can use an array of CSBuilders:
Code: Copy
lstItems.Initialize
    Dim cs As CSBuilder
    lstItems.AddAll(Array As Object(cs.Initialize.Alignment("ALIGN_CENTER").Color(xui.Color_Red).Append("Paris").PopAll, _
    cs.Initialize.Alignment("ALIGN_CENTER").Color(xui.Color_Magenta).Append("Lisbonne").popall, _
    cs.Initialize.Alignment("ALIGN_CENTER").Color(Colors.White).BackgroundColor(Colors.red).Append("Madrid").PopALL))    
    B4XComboBox2.SetItems(lstItems)
 
Upvote 1
Solution

Similar Threads

  • Question Question
Android Question B4XComboBox
Replies
2
Views
2K
  • Question Question
Android Question B4XComboBox
Replies
8
Views
3K
Replies
0
Views
3K
Replies
1
Views
3K
Back
Top