Guidance
指路人
g.yi.org
software / RapidQ / RQ Doc / html / qedit.html

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Appendix A: QEDIT
Rapid-Q Documentation by William Yu (c)1999-2000 Appendix A: QEDIT


QEDIT Component

QEdit is a single-line edit control. More or less used to take input from user.

QEdit Properties
FieldTypeR/WDefaultSupport





AlignINTEGERRWalNoneW
Align determines how the control aligns within its parent control.
AutoSizeINTEGERRWTrueW
AutoSize determines whether the edit control should adjust its size automatically to accomodate the height of the text.
BorderStyleINTEGERRWbsSingleW
CharCaseINTEGERRWecNormalW
CharCase determines the case of the text within the edit control.
0 = ecNormal -- The text of the edit box displays in mixed case.
1 = ecUpperCase -- The text of the edit box displays in uppercase.
2 = ecLowerCase -- The text of the edit box displays in lowercase.
ColorINTEGERRWW
EditTextSTRINGRWW
EditText is the value of the text for the edit control after it is formatted using InputMask
EnabledINTEGERRWTrueWXG
FontQFONTWW
HandleINTEGERRW
HeightINTEGERRWWXG
HintSTRINGRWWXG
InputMaskSTRINGRWW
InputMask is the mask that represents what text is valid for the edit control
IsMaskedINTEGERRFalseW
IsMasked indicates whether a mask exists for the edit control.
LeftINTEGERRW0WXG
MaxLengthINTEGERRW0WXG
ModifiedINTEGERRWW
ParentQFORM/QPANEL/QTABCONTROLWWXG
PasswordCharSTRINGRWW
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.
PopupMenuQPOPUPMENUWW
ReadOnlyINTEGERRWFalseWXG
SelLengthINTEGERRWW
SelStartINTEGERRWW
SelTextSTRINGRWW
ShowHintINTEGERRWFalseWXG
TabOrderINTEGERRWW
TagINTEGERRWWXG
TextSTRINGRWWXG
TopINTEGERRW0WXG
VisibleINTEGERRWTrueWXG
WidthINTEGERRWWXG


QEdit Events
EventTypeOccurs when...ParamsSupport





OnChangeVOIDText changed0WXG
OnKeyDownSUB (Key AS WORD, Shift AS INTEGER)Key held down2W
OnKeyPressSUB (Key AS BYTE)User presses a key1W
OnKeyUpSUB (Key AS Word, Shift AS INTEGER)User releases a key2W
WndProcSUB (Hwnd%, Msg%, wParam%, lParam%)Messages sent to QEdit4W


QEdit Examples
  DIM Form AS QForm
  DIM Edit1 AS QEdit

  Edit1.Parent = Form

  Edit1.Text = "Hello"   '' Set as default text
  Form.ShowModal

'--------------------------------------------------------------

' Example 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.

Prev Component Contents Next Component
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2017-11-22  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:35