WinXAddEdit


hEdit = WinXAddEdit (parent, STRING title, style, id)

Adds a new edit control to the specified window.

Parameter Description
parent The window to create the edit control in
STRING title The text that will appear the the edit control before the user starts editing it
style The style of the edit control. See remarks
id The unique constant that identifies this edit control

Returns

The handle of the new edit control on success or 0 on fail

Remarks

The style parameter is a standard windows style. Listed are some of the more usefull constants. See the Win32 docmentation for more information. These constants can be combined with the | (or) operator.

$$ES_AUTOHSCROLL
Scroll horizonally when the user enters too much information
$$ES_MULTILINE
Creates a multiline edit box
$$ES_WANTRETURN
For edit controls with the $$ES_MULTILINE style, causes the edit control to respond to the [ENTER] key by insterting a new line
$$ES_READONLY
Prevents the user from editing the text
$$ES_PASSWORD
Hides what the user is typing. Be warned if you are getting a password, Use WinXSetText as soon as possible to erase the password from the edit control. There is nothing to stop a malicous program from spying on the contents of the edit control.
$$ES_NUMBER
Only allows entry of whole numbers.

The size and position of the edit control is set using either a custom control sizer function (controlSizer callback) or the auto sizer. To use the auto sizer, use the WinXAutoSizer_SetInfo function.

Examples

'define the constant for the id
$$EDIT1 = 100

'make the control
hEdit = WinXAddEdit (#hMain, "An edit control", $$ES_AUTOHSCROLL, $$EDIT1)

Related Links

WinXAutoSizer_SetInfo
controlSizer (Callback)