iOS Question Change combobox text color

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi, I want to use the B4XCombobox.
but I don’t know how to change the text color
I created it in the designer

8B12E747-948B-4E3D-BA6F-5FDCEFFB8B76.jpeg


thanks in advance !
 

Mike1970

Well-Known Member
Licensed User
Longtime User
B4X:
SetButtonTextColor(B4XComboBox1.mBtn, xui.Color_Red, 0)

B4X:
'state: 0 = normal, 1 = pressed, 2 = disabled
Sub SetButtonTextColor(btn As Button, clr As Int, state As Int)
    Dim no As NativeObject = btn
    no.RunMethod("setTitleColor:forState:", Array(no.ColorToUIColor(clr), state))
End Sub
Thanks Erel, it worked!
 
Upvote 0
Top