Jump to content
Sign in to follow this  
Guest Py7|-|[]/\/

GUI Edit Box Help

Recommended Posts

Guest Py7|-|[]/\/

Ok, I have created an Edit Box... My question is, how do I make it so that when the Edit Box is created the default text inside of it is already highlighted? Therefore the user can simply press "Backspace" to delete the default text. Thanks.

Share this post


Link to post
Share on other sites
this-is-me

AFIAK, it is not possible by styles, but try sendinc ctrl+a


Who else would I be?

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

Doesn't accept Ctrl + a in edit box. Oh well. Good thing I have a "Clear Box" button :)

Jon, could you add a possibilty for AutoIt to add this into the GUI functions for the next release? That would be cool.

Share this post


Link to post
Share on other sites
scriptkitty

try this:

#include <GUIConstants.au3>

GUICreate("My GUI edit") ; will create a dialog box that when displayed is centered

$myedit=GUICtrlCreateEdit ("First line"& @CRLF, 176,32,121,97,$ES_AUTOVSCROLL+$WS_VSCROLL)

GUISetState ()

GUICtrlSetData ($myedit, "Second line")

; Run the GUI until the dialog is closed

send("{APPSKEY}a")
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites
Guest Py7|-|[]/\/

Thanks scriptkitty.

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  

×