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

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

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


QBUTTON Component

QButton is a general purpose button control.

QButton Properties
FieldTypeR/WDefaultSupport





AlignINTEGERRWalNoneW
Align determines how the control aligns within its parent control.
BMPSTRINGRWW
Use BMP to assign a new bitmap file, or to use BMP in a draw statement.
Examples:
DIM button AS QBUTTON
button.BMP = "whatever.bmp"
Details:
You can hold multiple images on a single bitmap, but they must be of the same size and next to each other in a horizontal row.
The "first" bitmap appears when the button is up.
The "second" bitmap appears when the button disabled.
The "third" bitmap appears when the button is down (clicked).
You have to tell Rapid-Q how many images are in your bitmap by assigning the number to NumBMPs.
BMPHandleRESOURCEWW
Assign a BMP resource handle to appear on the selected button.
Example:
$RESOURCE game_BMP AS "game.bmp"
DIM button AS QBUTTON
button.bmpHandle = game_BMP
CancelINTEGERRWFalseW
If Cancel is True, the button's OnClick event handler executes when the user presses the Escape key.
CaptionSTRINGRWWXG
Caption specifies the text that appears on the button. To underline a character, include an ampersand (&) symbol before the character.
ColorINTEGERRWX
CursorINTEGERRWcrDefaultW
DefaultINTEGERRWFalseW
If Default is True, the button's OnClick event handler executes when the user presses the Enter key.
EnabledINTEGERRWTrueWXG
FontQFONTWW
HandleINTEGERRW
HeightINTEGERRWWXG
HintSTRINGRWWXG
KindINTEGERRWbkCustomW
LayoutINTEGERRWblBMPLeftW
Layout determines where the bitmap image appears on the button.
0 = blBMPLeft -- image appears at the left side of the caption
1 = blBMPRight -- image appears at the right side of the caption
2 = blBMPTop -- image appears above the caption
3 = blBMPBottom -- image appears below the caption
LeftINTEGERRW0WXG
ModalResultINTEGERRWmrNoneW
NumBMPsINTEGERRWW
NumBMPs determines the number of images within the bitmap button.
ParentQFORM/QPANEL/QTABCONTROLWWXG
PopupMenuQPOPUPMENUWW
ShowHintINTEGERRWFalseWXG
SpacingINTEGERRW4W
Determines the separation, in pixels, between the image and the caption.
TabOrderINTEGERRWW
TagINTEGERRWWXG
TopINTEGERRW0WXG
WidthINTEGERRWWXG
VisibleINTEGERRWTrueWXG

QButton Methods
MethodTypeDescriptionParamsSupport





StartDragSUBAllows Button to be dragged0W

QButton Events
EventTypeOccurs when...ParamsSupport





OnClickVOIDUser clicked on the button0WXG
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
OnMouseDownSUB (Button%, X%, Y%, Shift%)Mouse button held down4WXG
OnMouseMoveSUB (X%, Y%, Shift%)Mouse moves3WXG
OnMouseUpSUB (Button%, X%, Y%, Shift%)Mouse button is released4WXG


QButton Examples
  '-- A drag button

  DIM Form AS QForm
  DIM Button AS QButton

  SUB MouseDown
      Button.StartDrag
      SHOWMESSAGE STR$(Button.Left)+", "+STR$(Button.Top)
  END SUB

  Button.Parent = Form
  Button.OnMouseDown = MouseDown

  Form.ShowModal

Prev Component Contents Next Component
掌柜推荐
 
 
¥738.00 ·
 
 
¥1,480.00 ·
 
 
¥397.00 ·
 
 
¥950.00 ·
 
 
¥264.00 ·
 
 
¥1,005.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2015-12-25 19:42:29