當前位置:編程學習大全網 - 源碼下載 - 關於Delphi的TMemo控件

關於Delphi的TMemo控件

TMemo歸屬stdrctrls單元 類關系為TObject-TPeresistent-TCompontent-TContol-TWinControl-TCustomEdit-TCustomMemo;可以利用Ctrl+類名跟蹤壹下,可以看到memo的text是繼承了上層TCustomEdit中的Text屬性可以繼續向上追蹤。

TCustomEdit的屬性列表如下:

StdCtrls.TCustomEdit PropertiesFrom RAD Studio VCL Referencer

Up to Parent: TCustomEdit

Alignment Determines how the text is aligned within the text edit control.

AutoSelect Determines whether all the text in the edit control is automatically selected when the control gets focus.

AutoSize Determines whether the height of the edit control automatically resizes to accommodate the text.

BorderStyle Determines whether the edit control has a single line border around the client area.

CanUndo Indicates whether the edit control contains changes that can be backed out.

CharCase Determines the case of the text within the edit control.

HideSelection Determines whether the visual indication of the selected text remains when focus shifts to another control.

MaxLength Specifies the maximum number of characters the user can enter into the edit control.

Modified Indicates whether the user edited the text of the edit control.

NumbersOnly Allows only numbers to be typed into the text edit.

OEMConvert Determines whether characters typed in the edit control are converted from ANSI to OEM and then back to ANSI.

ParentColor

PasswordChar Indicates the character, if any, to display in place of the actual characters typed in the control.

ReadOnly Determines whether the user can change the text of the edit control.

SelLength Specifies the number of characters (bytes) that are selected.

SelStart Specifies the position of the first selected character in the text.

SelText Specifies the selected portion of the edit control's text.

TabStop

Text

TextHint A hint or message to be displayed when the Text property is empty.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

text在delphi中的描述為:

StdCtrls.TCustomEdit.Text inherits from Controls.TControl.Text. All content below this line refers to Controls.TControl.Text.

Contains a text string associated with the control.

Use the Text property to read the Text of the control or to specify a new string for the Text value. By default, Text is the control name. For edit controls and memos, the Text appears within the control. For combo boxes, the Text is the content of the edit control portion of the combo box.

Note: Controls that display text use either the Caption property or the Text property to specify the text value. Which property is used depends on the type of control. In general, Caption is used for text that appears as a window title or label, while Text is used for text that appears as the content of a control.

  • 上一篇:移動互聯網王國前景無限 谷歌怎樣締造?
  • 下一篇:易於使用的設計源代碼
  • copyright 2024編程學習大全網