B Baris Karadeniz Active Member Licensed User May 18, 2016 #1 I ma sure it is very easy but unfortunately I can't see the written statement for textview hinttext. What can be the problem?
I ma sure it is very easy but unfortunately I can't see the written statement for textview hinttext. What can be the problem?
Erel B4X founder Staff member Licensed User Longtime User May 18, 2016 #2 You should set the hint text with the designer: It will only appear when the text is empty. Note that a better option is to use FloatLabeledEditText: https://www.b4x.com/android/forum/threads/floatlabelededittext-iui8.64096/#content Upvote 0
You should set the hint text with the designer: It will only appear when the text is empty. Note that a better option is to use FloatLabeledEditText: https://www.b4x.com/android/forum/threads/floatlabelededittext-iui8.64096/#content
B Baris Karadeniz Active Member Licensed User May 18, 2016 #3 I wrote hint text exactly to the place which you show. But it is not seen on the screen. That is why I am surprised and asked. What can be my fault? Upvote 0
I wrote hint text exactly to the place which you show. But it is not seen on the screen. That is why I am surprised and asked. What can be my fault?
Erel B4X founder Staff member Licensed User Longtime User May 18, 2016 #4 Difficult to say without seeing your project. Try to reproduce it in a small project. Upvote 0
B Baris Karadeniz Active Member Licensed User May 18, 2016 #5 Ok. I will try in another small project. Is it possible to translate HintText? if it is written in designer how it will be? Isn't it possible to write as; Code: TextFieldx.HintText = "Hello" Upvote 0
Ok. I will try in another small project. Is it possible to translate HintText? if it is written in designer how it will be? Isn't it possible to write as; Code: TextFieldx.HintText = "Hello"
Erel B4X founder Staff member Licensed User Longtime User May 18, 2016 #6 You can change it in the code. Your code is correct. Upvote 0
B Baris Karadeniz Active Member Licensed User May 18, 2016 #7 So, without writing anything in designer, if I write to the application start as I wrote, it should work also I think. Am I right? Upvote 0
So, without writing anything in designer, if I write to the application start as I wrote, it should work also I think. Am I right?
B Baris Karadeniz Active Member Licensed User May 18, 2016 #8 I think, I saw the problem. Background colour of textfield is black and the font color of the hinttext is gray. So, I can't see. How can I change HintText color? Upvote 0
I think, I saw the problem. Background colour of textfield is black and the font color of the hinttext is gray. So, I can't see. How can I change HintText color?
tufanv Expert Licensed User Longtime User May 18, 2016 #9 Baris Karadeniz said: I think, I saw the problem. Background colour of textfield is black and the font color of the hinttext is gray. So, I can't see. How can I change HintText color? Click to expand... lets say you are having problem with txtusername.text use below code under aapplicatio_start: Code: Dim NoTxtField As NativeObject = txtusername Dim AttrTxt As AttributedString AttrTxt.Initialize(txtusername.HintText, txtusername.Font, Colors.white) NoTxtField.SetField("attributedPlaceholder", AttrTxt ) this will set the hint color of txtusername.text to white. ( dont forget to set the hinttext in designer for example: "Kullanıcı Adınız" for the txtusername.text ) Upvote 0
Baris Karadeniz said: I think, I saw the problem. Background colour of textfield is black and the font color of the hinttext is gray. So, I can't see. How can I change HintText color? Click to expand... lets say you are having problem with txtusername.text use below code under aapplicatio_start: Code: Dim NoTxtField As NativeObject = txtusername Dim AttrTxt As AttributedString AttrTxt.Initialize(txtusername.HintText, txtusername.Font, Colors.white) NoTxtField.SetField("attributedPlaceholder", AttrTxt ) this will set the hint color of txtusername.text to white. ( dont forget to set the hinttext in designer for example: "Kullanıcı Adınız" for the txtusername.text )
B Baris Karadeniz Active Member Licensed User May 18, 2016 #10 Without setting in the designe, can I write the code below? They are not same? Code: TextFieldx.HintText = "Hello" Upvote 0
Without setting in the designe, can I write the code below? They are not same? Code: TextFieldx.HintText = "Hello"
tufanv Expert Licensed User Longtime User May 18, 2016 #11 they are the same.But you have to write this code before the code i gave . Because it will take the hinttext of textview so you have to set textfieldx.hinttext = "Hello" before the code i wrote above. Upvote 0
they are the same.But you have to write this code before the code i gave . Because it will take the hinttext of textview so you have to set textfieldx.hinttext = "Hello" before the code i wrote above.
B Baris Karadeniz Active Member Licensed User May 18, 2016 #12 Ok. I did as you said. When the app starts, it is ok. But when the hint text translated to another language it disappears again. So, do I need to write your codes for each translation place? Upvote 0
Ok. I did as you said. When the app starts, it is ok. But when the hint text translated to another language it disappears again. So, do I need to write your codes for each translation place?
Erel B4X founder Staff member Licensed User Longtime User May 19, 2016 #13 As I wrote, you should create a small project that demonstrates the problem and upload it. Upvote 0