TXEDIT Mnemonic - Create a Custom Edit Control

Syntax

'TXEDIT'(id,x,y,w,h,title,flags)

Description

The 'TXEDIT' mnemonic creates a custom edit control. The custom edit control holds one or more lines of text, known as paragraphs, each of which may occupy one or more physical lines, depending on the "wrap" setting. If the text will be limited to one line, use the EDIT Mnemonic - Create An Edit Control instead.

Note: The 'TXEDIT' mnemonic is retained for backward compatibility only. Because it is more consistent with other existing controls and more options are available, use the'CEDIT'mnemonic wherever 'TXEDIT' would be used.

Parameter

Description

id

Control ID number. It must be an integer between 1 and 32767 and be unique within a given top-level window.

x

Horizontal position of the upper-left corner of the control in current units.

y

Vertical position of the upper-left corner of the control in current units.

w

Width of the control in current units.

h

Height of the control in current units.

title

Title of the control. If a nonempty title string is included in the parameter list, it is added as the first paragraph in the custom edit control. If the title string is empty, the custom edit control initially contains no paragraphs.

flags

Control flags. The flags for custom edit controls are different from those for other controls and are as follows:

 

Flag 

Description

 

$0001$ 

Defines the edit text as read-only.

 

$0002$ 

Causes the control to wrap text to the next line.

(Disables the horizontal scroll bar).

 

$0004$ 

Includes a vertical scroll bar in the control.

 

$0008$ 

Includes a horizontal scroll bar in the control.

 

$0010$ 

Draws a border around the control.

 

$0080$ 

Limits the control text to one paragraph.

 

$2000$ 

Causes the control to be initially in overstrike mode.

 

$8000$ 

Causes the control to ignore tabs in text input. (Useful in dialogs.)

Unlike the scroll bars in windows, those in a custom edit control are visible at all times. If any scroll bars are used, a thin border is drawn around the custom edit control, and the "Border" flag makes it thicker. The color of the line drawn as the result of the "Border" flag can be customized (as is the text and background colors), but the thin border that accompanies scroll bars cannot be customized and is usually black. A special, full-window custom edit control can be created by specifying a width and height of 0. In this case, the custom edit control will always resize itself to occupy the entire window. This is useful for browsing or editing text in a resizable graphical window.

Note that if all values for x, y, w, and h are 0 in this mnemonic, then the edit control will be made to fill the window.

See Also

Mnemonics - Alphabetical Listing

Mnemonics - Group Listing