iOS Question Possible to Picker font, color and size ... row height!!

Erel

B4X founder
Staff member
Licensed User
Longtime User
Yes.
SS-2014-11-24_16.34.56.png


You should use AttributesString:
B4X:
Private Sub Application_Start (nav As NavigationController)
   NavControl = nav
   Page1.Initialize("Page1")
   NavControl.ShowPage(Page1)
   Page1.RootPanel.LoadLayout("1")
   Picker1.SetRowsHeight(35)
   Dim items As List
   items.Initialize
   For i = 1 To 100
     Dim s As AttributedString
     s.Initialize("Item #" & i, Font.CreateNew(30), Rnd(0x8fffffff, -1))
     items.Add(s)
   Next
   Picker1.SetItems(0, items)
End Sub
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Yes.
You should use AttributesString:
B4X:
Private Sub Application_Start (nav As NavigationController)
   NavControl = nav
   Page1.Initialize("Page1")
   NavControl.ShowPage(Page1)
   Page1.RootPanel.LoadLayout("1")
   Picker1.SetRowsHeight(35)
   Dim items As List
   items.Initialize
   For i = 1 To 100
     Dim s As AttributedString
     s.Initialize("Item #" & i, Font.CreateNew(30), Rnd(0x8fffffff, -1))
     items.Add(s)
   Next
   Picker1.SetItems(0, items)
End Sub

erel after adding an attributedstring to the picker how can i get the selecteditem.value from the picker???

if i do like this: dim str as string = picker1.getselecteditem(0)

i wont get ONLY the value....
 
Last edited:
Upvote 0
Top