Jump to content

Recommended Posts

Posted (edited)

Hey there

I want to mark the content of an inputbox when you click on the text inside.

Excample: I have an inputbox which has the data "a". When I click inside the inputbox I want the "a" to be highlighted blue, so I can easily copy-paste it out.

GUICreate("",300,100)
$Input1 = GUICtrlCreateInput("",10,10,50,30)
$Input2 = GUICtrlCreateInput("a",100,10,50,30)
GUISetState()
While True
   Switch GUIGetMsg()
   Case -3
      Exit
   EndSwitch
WEnd

I searched google and the forum and did not find anything.

Thanks!

Edited by Quegga
Posted

I'm not sure this is possible with GUICtrlCreateInput. But maybe _GUICtrlEdit_SetSel is what you are looking for. Try the example script.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

Thanks a lot,
 this was exactely what I was searching for.

It is possible to use _GUICtrlEdit_SetSel on a GUICtrlCreateInput

Edited by Quegga
Posted

Don't know. Did you try it?

My UDFs and Tutorials:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...