[Properties (by Name)] [Methods (by Name)]
A basic text edit widget
Source position: mseedit.pas line 638
type tedit = class(tcustomedit,istatfile) |
||
public |
||
constructor create(); override; |
||
destructor destroy; override; |
||
published |
||
property statfile: tstatfile; [rw] |
||
property statvarname: msestring; [rw] |
||
property statpriority: Integer; [rw] |
||
property delay: Integer; [rw] |
|
Unlike t*edit widgets (e.g. tstringedit), whose value is only committed on Enter or on losing focus, tedit can react to each keystroke |
property ontextediteddelayed: texteditedeventty; [rw] |
||
property optionsedit1: optionsedit1ty; |
||
property optionsedit: optionseditty; |
||
property font: twidgetfont; |
||
property textflags: textflagsty; |
||
property textflagsactive: textflagsty; |
||
property passwordchar: msechar; |
||
property empty_options: emptyoptionsty; |
||
property empty_color: colorty; |
||
property empty_font: twidgetfontempty; |
||
property empty_fontstyle: fontstylesty; |
||
property empty_textflags: textflagsty; |
||
property empty_text: msestring; |
||
property empty_textcolor: colorty; |
||
property empty_textcolorbackground: colorty; |
||
property maxlength: Integer; |
||
property caretwidth: Integer; |
||
property cursorreadonly: cursorshapety; |
||
property onchange: notifyeventty; |
||
property ontextedited: texteditedeventty; |
||
property onkeydown: keyeventty; |
||
property onkeyup: keyeventty; |
||
property oncopytoclipboard: updatestringeventty; |
||
property onpastefromclipboard: updatestringeventty; |
||
end; |
|
A basic text edit widget |
|
| | | ||
| | | ||
| | | ||
| | | ||
| | | ||
| | | ||
| | | ||
| | | ||
|
Extends the FPC tcomponent with object linking facilities and the like; base of every MSEgui component |
|
| | | ||
tcomponent,ievent,iificommand,iificlient |
||
| | | ||
| | | ||
TObject |
A basic text edit widget.
Hint: In MSEgui one very seldom uses TEdit but one of the TDataEdit descendants (TStringEdit, TIntegerEdit...). They have the event properties OnSetValue and OnDataEntered which can be used in order to react on user entries.
A tedit can be created and configured at run time, as in the following example, which creates a second tedit with a custom frame caption and a gradient face, and inserts it into the form.
uses main_mfm; procedure tmainfo.mainformcreated(const sender: TObject); begin tedit2 := tedit.create(self); tedit2.bounds_cx := 100; tedit2.bounds_cy := 21; tedit2.createframe; tedit2.frame.caption := 'Hello'; tedit2.frame.levelo := -2; tedit2.createface; tedit2.face.fade_color.count := 2; tedit2.face.fade_color[0] := cl_ltgreen; tedit2.face.fade_color[1] := cl_dkgreen; tedit2.face.fade_direction := gd_down; insertwidget(tedit2, makepoint(8, 40)); tedit2.show; end; procedure tmainfo.mainformdestroy(const sender: TObject); begin tedit2.free; end;