Поле | Тип | R/W | По умолчанию | Поддерживается |
|
|
|
|
|
Align | INTEGER | RW | alNone | W |
| Align определяет как компонент располагается на родительской форме
|
AutoSize | INTEGER | RW | True | W |
| AutoSize определяет, что компонент автоматически подгоняет свои размеры
под высоту текста.
|
BorderStyle | INTEGER | RW | bsSingle | W |
CharCase | INTEGER | RW | ecNormal | W |
| CharCase определяет регистр вводимого текста.
0 = ecNormal -- Текст вводится в произвольном регистре.
1 = ecUpperCase -- Текст вводится в верхнем регистре.
2 = ecLowerCase -- Текст вводится в нижнем регистре.
|
Color | INTEGER | RW | | W |
EditText | STRING | RW | | W |
| EditText - текст после форматирования с использованем InputMask
|
Enabled | INTEGER | RW | True | WXG |
Font | QFONT | W | | W |
Handle | INTEGER | R | | W |
Height | INTEGER | RW | | WXG |
Hint | STRING | RW | | WXG |
InputMask | STRING | RW | | W |
| InputMask - ввод теста по маске.
|
IsMasked | INTEGER | R | False | W |
| IsMasked показывает, что использовался ввод текста по маске.
|
Left | INTEGER | RW | 0 | WXG |
MaxLength | INTEGER | RW | 0 | WXG |
Modified | INTEGER | RW | | W |
Parent | QFORM/QPANEL/QTABCONTROL | W | | WXG |
PasswordChar | STRING | RW | | W |
| PasswordChar определяет символ, который показывается при вводе текста как пароля.
indicates the character, if any, to display in place of the
actual characters typed in the control. An empty string indicates that text should be displayed normally.
|
PopupMenu | QPOPUPMENU | W | | W |
ReadOnly | INTEGER | RW | False | WXG |
SelLength | INTEGER | RW | | W |
SelStart | INTEGER | RW | | W |
SelText | STRING | RW | | W |
ShowHint | INTEGER | RW | False | WXG |
TabOrder | INTEGER | RW | | W |
Tag | INTEGER | RW | | WXG |
Text | STRING | RW | | WXG |
Top | INTEGER | RW | 0 | WXG |
Visible | INTEGER | RW | True | WXG |
Width | INTEGER | RW | | WXG |
QEdit Примеры
DIM Form AS QForm
DIM Edit1 AS QEdit
Edit1.Parent = Form
Edit1.Text = "Hello" '' Set as default text
Form.ShowModal
'--------------------------------------------------------------
' Пример on how to handle OnKeyDown event
SUB EditKeyDown (Key AS WORD, Shift AS INTEGER, Sender AS QEDIT)
SELECT CASE Key
CASE 27
SHOWMESSAGE "Escape key pressed!"
CASE 13
SHOWMESSAGE "Enter key pressed!"
END SELECT
END SUB
CREATE Form AS QFORM
Center
CREATE Edit AS QEDIT
OnKeyDown = EditKeyDown
END CREATE
ShowModal
END CREATE
QEdit Input Masks
! If a ! character appears in the mask, optional characters are represented
in the EditText as leading blanks. If a ! character is not present, optional
characters are represented in the EditText as trailing blanks.
> If a > character appears in the mask, all characters that follow are in
uppercase until the end of the mask or until a < character is encountered.
< If a < character appears in the mask, all characters that follow are in
lowercase until the end of the mask or until a > character is encountered.
<> If these two characters appear together in a mask, no case checking is
done and the data is formatted with the case the user uses to enter the data.
\ The character that follows a \ character is a literal character. Use this
character to use any of the mask special characters as a literal in the data.
L The L character requires an alphabetic character only in this position.
For the US, this is A-Z, a-z.
l The l character permits only an alphabetic character in this position, but
doesn't require it.
A The A character requires an alphanumeric character only in this position.
For the US, this is A-Z, a-z, 0-9.
a The a character permits an alphanumeric character in this position, but
doesn't require it.
C The C character requires an arbitrary character in this position.
c The c character permits an arbitrary character in this position, but
doesn't require it.
0 The 0 character requires a numeric character only in this position.
9 The 9 character permits a numeric character in this position, but doesn't
require it.
# The # character permits a numeric character or a plus or minus sign in
this position, but doesn't require it.
: The : character is used to separate hours, minutes, and seconds in times.
If the character that separates hours, minutes, and seconds is different
in the regional settings of the Control Panel utility on your computer
system, that character is used instead.
/ The / character is used to separate months, days, and years in dates.
If the character that separates months, days, and years is different
in the regional settings of the Control Panel utility on your computer
system, that character is used instead.
; The ; character is used to separate the three fields of the mask.
_ The _ character automatically inserts spaces into the text. When the
user enters characters in the field, the cursor skips the _ character.