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. Note that 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.
Autosize INTEGER RW False W
AutoSize determines whether the size of the label automatically resizes to accommodate the text.
Caption STRING RW WXG
Color INTEGER RW WX
Cursor INTEGER RW crDefault W
Enabled INTEGER RW True WXG
Font QFONT W W
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 RW tlTop W
Layout determines the vertical placement of the text within the label.
0 = tlTop -- The text appears at the top of the label.
1 = tlCenter -- The text is vertically centered in the label.
2 = tlBottom -- The text appears along the bottom of the label.
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.Text = "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.Text = "Hello"
  Label1.Angle = 45
  Form.ShowModal

Prev ComponentContentsNext Component