How to highlight all text in textbox on got focus

Hi Koders, I am facing an issue

My issue:- I want to highlight all text in textbox when got focus, i used taifun textbox extension.

I tried:-

I tried to set the global value to text box length then, when it comes to focus, then the all the text would be highlighted in textbox,
Image:-

2nd way I tried

Direct way

I direct made the block to get the textbox text length, Both of them showed the error message

So what should i do

Both of them didn’t work

What’s the error message?

alright, now i didn’t get error message, as i did some changes, can you say me the solution to this??

What do you see, then?
Is any of the text selected at all?

Nope, just the cursors turns to blue color, which is highlighted color, it dosent highlight a single letter

A screenshot would be great.
Also, what’s the text you have entered in the textbox?

its url, please wait sending screenshot

Video:-
Sometime when i set the start position to 0, it shows error message, but not wen 1

but it is not solved

2 Likes

Improving on @Boban’s block above

blocks (22)

Try above blocks. You are missing two blocks

  1. SetHighlightColor
  2. RequestFocus

These blocks are given in the extension’s Example Use section. If only you would have read properly. @Xoma

1 Like

I don’t think this will work for his purpose

Btw, Textbox has highlight color and thereby I didn’t use it…

bild

2 Likes

I have checked above blocks (in my previous reply) and they are working as they should. One thing is that the block stop working if I remove or disable the RequestFocus block, else the blocks are working fine. I will check for Highlight color block, if need to use or not.

1 Like

it doesnt works for me

what about providing a screenshot of your relevant blocks?
also you might want to elaborate, what exactly does not work…
Taifun

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.