Creates an Input control for the GUI.
GUICtrlCreateInput ( "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_LEFT, $ES_AUTOHSCROLL forced styles : $WS_TABSTOP and $ES_MULTILINE is always reset. |
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.
Related
GUICoordMode (Option), GUICtrlSet..., GUIGetMsg, GUICtrlRead
Example
#include <GUIConstants.au3>
GUICreate(" My GUI input acceptfile", 320,120, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES
$file = GUICtrlCreateInput ( "", 10, 5, 300, 20)
GUICtrlSetState(-1,$GUI_ACCEPTFILES)
GUICtrlCreateInput ("", 10, 35, 300, 20) ; will not accept drag&drop files
$btn = GUICtrlCreateButton ("Ok", 40, 75, 60, 20)
GUISetState ()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $btn
exitloop
EndSelect
Wend
MsgBox (4096, "drag drop file", GUICtrlRead($file))