iOS Question How to change the color of "Hint" text in textfield?

John Woodsmall

Active Member
Licensed User
Longtime User
I need to change the color of the hint text.
I have used the routine below and it does not work.

B4X:
Speak_Text_1.Initialize("")
Speak_Text_1.HintText="Tap Here to Speak"' Dim NoTxtField AsNativeObject = Speak_Text_1
Dim AttrTxt AsAttributedString
AttrTxt.Initialize(Speak_Text_1.HintText, Speak_Text_1.Font, Colors.Blue)
NoTxtField.SetField("attributedPlaceholder", AttrTxt )

The hint text stays the lite grey color...no matter what i do.
 
Last edited by a moderator:

John Woodsmall

Active Member
Licensed User
Longtime User
in the designer.
ok
I found out (trial and error) that where you insert the code above makes a difference.
The page Initialize has to happen 1st then the code above works perfectly.
I am slowly getting how it works. People need to know this. I did not understand this,
maybe others don't know as well.
 
Upvote 0
Top