Represents class for standard input HTML object.
SmartCL.Controls.EditBox; TW3EditBox = class(TW3CustomControl) The EditBox control is implemented in the TW3EditBox class, which is defined in the w3editbox unit. It can be used to display an edit field. A sample code for this section is included in the ControlsEditBox project. Public methods: public function getMin: Variant; virtual; procedure setMin(const aValue: Variant); virtual; function getMax: Variant; virtual; procedure setMax(const aValue: Variant); virtual; function getRange: Variant; virtual; procedure setRange(const aValue: Variant); virtual; EditBox Input type: TW3InputType = ( itNone, itColor, itDate, itDateTime, itDateTimeLocal, itEmail, itMonth, itNumber, itRange, itSearch, itTel, itTime, itUrl, itWeek, itPassword); Properties: published property Range: Variant read getRange write setRange; property TextAlign: TTextAlign read getTextAlign write setTextAlign; property InputType: TW3InputType read getType write setType; property AutoCapitalize: Boolean read getAutoCapitalize write setAutoCapitalize; property AutoCorrect: Boolean read getAutoCorrect write setAutoCorrect; property PlaceHolder: String read getPlaceHolder write setPlaceHolder; property Text: String read getText write setText; property Value: Variant read getRange write setRange; . TextAlign Specifies text alignment (left, centre, right). . InputType Specifies the type of the input. Not all input types are supported in all browsers. Wellsupported types are itNone, itNumber and itPassword. . AutoCapitalize Sets the value for the autocapitalize attribute. Supported in Safari on iOS. . AutoCorrect Sets the value for the autocorrect attribute. Supported in Safari on iOS. . PlaceHolder Sets the placeholder text. This text is displayed in the edit box if it has no user-provided content. . Text Contains the value entered in the edit box. Useful inherited properties: . Angle . BorderRadius . Color Specifies colour for the background colour. Default (clNone) makes editbox white. . Enabled . Transparent . Visible . StyleClass . Name, Left, Top, Width, Height Useful events: . OnKeyUp Triggered when a key is released. New Text value is available at that moment. . OnChanged event looks like a natural candidate to do any processing when the editbox content changes, but it is not called at all when a user types into an editbox.. |
|
Unit: SmartCL.Controls.EditBox.pas
- Hierarchy
- TObject
- TW3TagObj
- TW3Component
- TW3MovableControl
- TW3CustomControl
- W3EditBox
W3CheckBox is a composite component consisted from TW3Label and TW3CheckMark components.
Properties
AutoCapitalize
Specifies whether first letter will be automatically upper-cased.
property AutoCapitalize: Boolean read getAutoCapitalize write setAutoCapitalize;
InputType
Specifies type of input control. Different input type enable entering different data types more easily, and prevents invalid inputs.
property InputType: TW3InputType read getType write setType;
Example:
W3EditBox1.InputType:= itRange;
W3EditBox1.InputType:= itColor;
Remarks:
Not all input types are supported in all browsers, and visual appearance may differ from browser to browser.
See also: TW3InputType
PlaceHolder
Specifies text placed inside text box, if value of Text property is empty and component is not focused.
property PlaceHolder: String read getPlaceHolder write setPlaceHolder;
This property set placeholder property of DOM object.
Text
Contains a text string associated with the control.
property Text: String read getText write setText;
TextAlign
Specifies horizontal alignment of text inside edit.
property TextAlign: TTextAlign read getTextAlign write setTextAlign;
This property changes textAlign property of DOM object.
Example:
W3EditBox1.TextAlign:= taRight;