i have a text input widget that has a default variable value of “enter your name here”
however i noticed that when i run the app on a tablet, i have to click on the box, then manually clear the default value. (i need the default value as the variable is used to filter a list of names i want to hide until the user is entered)
is there a way to auto highlight the text in the text input widget when its selected so all the user needs to do is either hit the backspace once or start typing something and the default value clears?
I had similar thoughts…
You could also make the Inpt slightly transparent and make a text behind the input.
When the change detector fires, the color of the text in background, can be changed to transparent, as lonbg as the length is > 0
or, if you use the default text, you can clear the variable when changing the default text by typing the first key. But it’s a little bit tricky to handle the input, because the change detection triggers by any changes.
The trigger is as shown above. With the Boole’sche variables it clears the input field with the first input (key or backspace or any other else) and stores the information that the default text was changed by switching the Boole’sche variable- Otherwise the trigger will clear for every typing key the input again
The issue here is that my interactive table is a list of all users which i want filtered by the text input. As i don’t want a list of all users showing by default, i created a default with a default value “your name here” so that there would only be records shown once the user starts typing in the text input… as there is no user with the name “your name here” the table will be blank by default.
this is why i believe this solution does need to influence the actual value as the actual value is what is filtering my interactive table. (unless i use a dummy variable as shown earlier)
was just seeing was there a cleaner way to do with with less manually clearing of the value…
Then you can add a Filter_Text variable and overhand the input_text to it. If its empty you set Filter_Text = “##__xx??” or a random string thats not likely to be a name. This can also happen in the change detector at the same time.
The solution to actually manipulate the input string by change detection is possible but tricky with many pitfalls.