Function Reference

GUICtrlCreateEdit

Creates an Edit control for the GUI.

GUICtrlCreateEdit ( "text", left, top [, width [, height [, style [, exStyle]]]] )

 

Parameters

text The text of the control.
left The left side of the control. If -1 is used then left will be computed according to GUICoordMode.
top The top of the control. If -1 is used then top will be computed according to GUICoordMode.
width [optional] The width of the control (default is the previously used width).
height [optional] The height of the control (default is the previously used height).
style [optional] Defines the style of the control. See GUI Control Styles Appendix.

default ( -1) : $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL
forced styles : $ES_MULTILINE, $WS_TABSTOP
exStyle [optional] Defines the extended style of the control. See Extended Style Table.

 

Return Value

Success: Returns the identifier (controlID) of the new control.
Failure: Returns 0.

 

Remarks

To obtain the value of the control see GUICtrlRead.
To set or change information in the control see GUICtrlSet....

To add styles to default style just BitOr($GUI_SS_DEFAULT_EDIT, newstyle,...).

 

Related

GUICoordMode (Option), GUICtrlSetData, GUICtrlSetState, GUIGetMsg, GUICtrlRead

 

Example


#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 ()

; will be append dont' forget 3rd parameter
GUICtrlSetData ($myedit, "Second line",1)

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
   
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend