Jump to content

GUI Edit Box Help


Guest Py7|-|[]/\/
 Share

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.

Link to comment
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.

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...