' Rapid-Q by William Yu (c)1999-2000 . ' ================================================================================ ' Upload_il_tuo_script_su_Rapidq.it ' Qbutton ****** QBUTTON Component ****** QButton is a general purpose button control. QButton Properties Field Type R/W Default Support =============== =============== =============== =============== =============== Align INTEGER RW alNone W Align determines how the control aligns within its parent control. BMP STRING RW W 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. BMPHandle RESOURCE W W 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 Cancel INTEGER RW False W If Cancel is True, the button's OnClick event handler executes when the user presses the Escape key. Caption STRING RW WXG Caption specifies the text that appears on the button. To underline a character, include an ampersand (&) symbol before the character. Color INTEGER RW X Cursor INTEGER RW crDefault W Default INTEGER RW False W If Default is True, the button's OnClick event handler executes when the user presses the Enter key. Enabled INTEGER RW True WXG Font QFONT W W Handle INTEGER R W Height INTEGER RW WXG Hint STRING RW WXG Kind INTEGER RW bkCustom W Layout INTEGER RW blBMPLeft W 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 Left INTEGER RW 0 WXG ModalResult INTEGER RW mrNone W NumBMPs INTEGER RW W NumBMPs determines the number of images within the bitmap button. Parent QFORM/QPANEL/ W WXG QTABCONTROL PopupMenu QPOPUPMENU W W ShowHint INTEGER RW False WXG Spacing INTEGER RW 4 W Determines the separation, in pixels, between the image and the caption. TabOrder INTEGER RW W Tag INTEGER RW WXG Top INTEGER RW 0 WXG Width INTEGER RW WXG Visible INTEGER RW True WXG QButton Methods Method Type Description Params Support =============== =============== =============== =============== =============== StartDrag SUB Allows Button 0 W to be dragged QButton Events Event Type Occurs when... Params Support =============== =============== =============== =============== =============== OnClick VOID User clicked on 0 WXG the button SUB (Key AS OnKeyDown Word, Shift AS Key held down 2 W INTEGER) OnKeyPress SUB (Key AS User presses a 1 W BYTE) key SUB (Key AS User releases a OnKeyUp Word, Shift AS key 2 W INTEGER) OnMouseDown SUB (Button%, Mouse button 4 WXG X%, Y%, Shift%) held down OnMouseMove SUB (X%, Y%, Mouse moves 3 WXG Shift%) OnMouseUp SUB (Button%, Mouse button is 4 WXG X%, Y%, Shift%) released 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 ' =============================================================================== ' 2003 Holyguard.net - 2007_Abruzzoweb