iOS Question Hint Text (Placeholder) in TextView programmatically

Fabio Campanella

Member
Licensed User
Longtime User
Hi,
is possible to set Hint text (placeholder) in the textview and programmatically in the code?
Thanks.
 

Fabio Campanella

Member
Licensed User
Longtime User
Yes.
B4X:
tf.HintText = "123"

Hi Erel. Unfortunately I have to use TextView Control (not TextField) in my app. How can i do?
Thanks!!!

P.S. I have found another post that you explain that this feature is not available in TextView.

Ok, I will any trick :),
 
Last edited:
Upvote 0

Grant Fullen

Member
Licensed User
You can manually make it happen. You can place your hint text as the default text. Also change the font to match the hint text. Then when focused on, have it revert to the normal font and clear it. Not as easy as .HintText = but it'll work.

Edit:
On a second thought, you could create and anchor a label for the hint text and just make it visible/not visible on focus.
 
Last edited:
Upvote 0
Top