Description

The ATextBox control allows the user to display and edit text in a rectangular box.

Properties

 

Alignment

HelpContextID

Object

Tag

Appearance

HideSelection

PasswordChar

Text

BackColor

hWnd

ScrollBars

ToolTipText

BorderStyle

Image

SelLength

Top

Description

Left

SelStart

Visible

Enabled

Locked

SelText

WantReturn

Font

MaxLength

TabPositions

WhatsThisHelpID

ForeColor

MultiLine

TabPositionsCount

WhatsThisHelpText

Height

Name

TabStop

Width

Methods

 

Move

SetFocus

ShowWhatsThis

Refresh

ShowHelpContext

ZOrder

Events

 

OnChange

OnHelpContext

OnLostFocus

OnWhatsThisHelp

OnClick

OnKeyDown

OnMouseDown

 

OnDblClick

OnKeyPress

OnMouseMove

 

OnGotFocus

OnKeyUp

OnMouseUp

 

Constants

 

enumATextBoxAlignment

enumATextBoxScrollBars

Comments

The text displayed in the control can be set at run time or at design time using the Text string Property.

To display multiple lines of text in ATextBox control, set the MultiLine property to True. If multiple line is required separate each line with "\r\n" to indicate line breaks. If a multiple-line ATextBox doesn't have a horizontal scroll bar, text wraps automatically even when the ATextBox is resized. To customize the scroll bar combination on a ATextBox, set the ScrollBars property. TabPositions property can be used to control the position of multi-line tabbed text to archive table like layout of a text in multi-line mode.

The Alignment property can be used to change the alignment of the text within the text box.

The text box control supports selecting of text and clipboard operation such as cut, copy or paste. The selected text and its position can be retrieved using the SelText, SelSTart and SelLength properties.

The WantReturn property can be used in a multi-line mode to allow inserting of line break when the ENTER key is pressed; otherwise the use must press on CTRL+ENTER to insert new line.

See Also

AComboBox, AGroupBox, ALabel, AListBox