Sign in to follow this  
Followers 0
billthecreator

Edits and Inputs

2 posts in this topic

How would one be able CTRL+A in a edit or input and select all. Hotkey im guessing, but it wouldnt allow me to. Is there any other way to have the function select all in the edit with text


[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Share this post


Link to post
Share on other sites



Hi,

You could try using _GUICtrlEditSetSel() udf, found in the Help File under

User Defined Function Reference ->GuiEdit Management ->_GUICtrlEditSetSel()

Example using hotkey Ctrl + A to select all...

#include <GUIConstants.au3>
#include <GuiEdit.au3>

HotKeySet("^a", "SelectAll")

GUICreate("Ctrl + A to Select All", 400, 400)
$EditBox = GUICtrlCreateEdit("", 10, 10, 380, 380)
GUISetState()

While 1
   $msg = GUIGetMsg()
   Select
      Case $msg = $GUI_EVENT_CLOSE
         ExitLoop
   EndSelect
WEnd

Func SelectAll()
    _GUICtrlEditSetSel ($EditBox, 0, -1)
EndFunc

Probly other ways to do it as well, but this was the first example I could think of..

Cheers

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0