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


QLABEL Component

QLabel is a non-windowed control used to display 2D, 3D, and/or rotated text on a form/container. Rotated labels only work with true type fonts.

QLabel Properties
Field Type R/W Default Support
Align INTEGER RW alNone W

Align determines how the control aligns within its parent control.
Alignment INTEGER RW taLeftJustify W

Alignment determines the horizontal placement of the text within the label.
0 = taLeftJustify -- The text appears lined up along the left edge of the label.
1 = taRightJustify -- The text appears lined up along the right edge of the label.
2 = taCenter -- The text is horizontally centered in the label.
Angle INTEGER RW 0 W

Angle determines how the label is rotated. Specify a degree from 0 to 360. Only works with True Type Fonts
Autosize INTEGER RW False W

AutoSize determines whether the size of the label automatically resizes to accommodate the text.
Must occur before  the Caption property is set.
Caption STRING RW
WXG
Color INTEGER RW
WX
Cursor INTEGER RW crDefault W
Enabled INTEGER RW True WXG
Font QFONT W
W

Setting the font will resize the Width and Height of the label.
Handle INTEGER R
W
Height INTEGER RW
WXG
Hint STRING RW
WXG
LabelStyle INTEGER RW tsNone W

LabelStyle determines whether the label is displayed as 3D or 2D.
0 = lsNone -- The text appears as normal 2d text.
1 = lsRaised -- The text appears as 3d.
2 = lsRecessed -- The text appears engraved.
Layout INTEGER    (***  PROPERTY DOESN'T WORK  ****) RW tlTop W
Left INTEGER RW 0 WXG
LowerColor INTEGER RW clBtnShadow W
Parent QFORM/QPANEL/QTABCONTROL W
WXG
PopupMenu QPOPUPMENU W
W
ShowHint INTEGER RW False WXG
Tag INTEGER RW
WXG
Top INTEGER RW 0 WXG
Transparent INTEGER RW False W
UpperColor INTEGER RW clBtnHighlight W
Visible INTEGER RW True WXG
Width INTEGER RW
WXG
Wordwrap INTEGER RW False W


QLabel Events
Event Type Occurs when... Params Support





OnClick VOID User clicks on label 0 W
OnDblClick VOID User double clicked on label 0 W
OnMouseDown SUB (Button%, X%, Y%, Shift%) Mouse button held down 3 W
OnMouseMove SUB (X%, Y%, Shift%) Mouse moves 2 W
OnMouseUp SUB (Button%, X%, Y%, Shift%) Mouse button is released 3 W
WndProc SUB (Hwnd%, Msg%, wParam%, lParam%) Messages sent to QLabel 4 W


QLabel Examples
  DIM Form AS QForm
DIM Label1 AS QLabel

Label1.Parent = Form
Label1.Caption = "Hello"
Form.ShowModal

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

' Note that rotated labels only work with true type
' fonts, such as Arial and Courier New.

DIM Form AS QForm
DIM Label1 AS QLabel
DIM Font AS QFont

Font.Name = "Arial"

Label1.Parent = Form
Label1.Font = Font
Label1.Caption = "Hello"
Label1.Angle = 45
Form.ShowModal

Prev Component Contents Next Component