Difference between revisions of "TMaskEdit"
From Lazarus wiki
Jump to navigationJump to search (Created page with "A '''TMaskEdit''' image:tmaskedit.png is a control with a single line of editable text that has to fit to a predefined mass. It is available from the Additional tab of...") |
|||
Line 1: | Line 1: | ||
− | A '''TMaskEdit''' [[image:tmaskedit.png]] is a control with a single line of editable text that has to fit to a predefined | + | A '''TMaskEdit''' [[image:tmaskedit.png]] is a control with a single line of editable text that has to fit to a predefined 'EditMask'. It is available from the [[Additional tab]] of the [[Component Palette]]. |
+ | |||
+ | The EditMask is formde with a patter of characters with the following meaning: | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | | cMask_SpecialChar || \ || after this you can set an arbitrary char | ||
+ | |- | ||
+ | | cMask_UpperCase || > || after this the chars is in upper case | ||
+ | |- | ||
+ | | cMask_LowerCase || < || after this the chars is in lower case | ||
+ | |- | ||
+ | | cMask_Letter || l || only a letter but not necessary | ||
+ | |- | ||
+ | | cMask_LetterFixed || L || only a letter | ||
+ | |- | ||
+ | | cMask_AlphaNum || a || an alphanumeric char (['A'..'Z','a..'z','0'..'9']) but not necessary | ||
+ | |- | ||
+ | | cMask_AlphaNumFixed || A || an alphanumeric char | ||
+ | |- | ||
+ | | cMask_AllChars || c || any Utf8 char but not necessary | ||
+ | |- | ||
+ | | cMask_AllCharsFixed || C || any Utf8 char #32 - #255 | ||
+ | |- | ||
+ | | cMask_Number || 9 || only a number but not necessary | ||
+ | |- | ||
+ | | cMask_NumberFixed || 0 || only a number | ||
+ | |- | ||
+ | | cMask_NumberPlusMin || # || only a number or + or -, but not necessary | ||
+ | |- | ||
+ | | cMask_HourSeparator || : || automatically put the hour separator char | ||
+ | |- | ||
+ | | cMask_DateSeparator || / || automatically but the date separator char | ||
+ | |- | ||
+ | | cMask_SpaceOnly || _ || automatically put a space //not Delphi compatible } | ||
+ | |- | ||
+ | | cMask_NoLeadingBlanks || ! || Trim leading blanks, otherwise trim trailing blanks from the data | ||
+ | |} | ||
+ | |||
==See also== | ==See also== |
Revision as of 21:16, 23 July 2016
A TMaskEdit is a control with a single line of editable text that has to fit to a predefined 'EditMask'. It is available from the Additional tab of the Component Palette.
The EditMask is formde with a patter of characters with the following meaning:
cMask_SpecialChar | \ | after this you can set an arbitrary char |
cMask_UpperCase | > | after this the chars is in upper case |
cMask_LowerCase | < | after this the chars is in lower case |
cMask_Letter | l | only a letter but not necessary |
cMask_LetterFixed | L | only a letter |
cMask_AlphaNum | a | an alphanumeric char (['A'..'Z','a..'z','0'..'9']) but not necessary |
cMask_AlphaNumFixed | A | an alphanumeric char |
cMask_AllChars | c | any Utf8 char but not necessary |
cMask_AllCharsFixed | C | any Utf8 char #32 - #255 |
cMask_Number | 9 | only a number but not necessary |
cMask_NumberFixed | 0 | only a number |
cMask_NumberPlusMin | # | only a number or + or -, but not necessary |
cMask_HourSeparator | : | automatically put the hour separator char |
cMask_DateSeparator | / | automatically but the date separator char |
cMask_SpaceOnly | _ | automatically put a space //not Delphi compatible } |
cMask_NoLeadingBlanks | ! | Trim leading blanks, otherwise trim trailing blanks from the data |
See also
- TMaskEdit doc
- TEdit - A basic field
- TLabeledEdit - An edit field like a TEdit with a label
- TSpinEdit - An edit field for integers defined numbers range limits
- TFloatSpinEdit - An edit field for tiles floating-point numbers with defined numbers range limits
- TEditButton - An edit field like a TEdit with an attached button as a TSpeedBtn
- TFileNameEdit - An edit field with attached TOpenDialog, to enter a file name
- TDirectoryEdit - An edit field with attached TSelectDirectoryDialog, to enter a file path
- TDateEdit - An edit field with attached TCalendarDialog (calendar), to enter a date
- TCalcEdit - An input field with attached TCalculatorDialog (Calculator), to enter a number
- TTIEdit - An RTTI capable input field