Rapid-Q Documentation by Peter Molloy (c) 2001

Appendix A: QDIGDISPLAY


 

QDIGDISPLAY Component

QDigDisplay simulates a seven segment LED display.


QDigDisplay Properties

Field

Type

R/W

Default

Support






Align

INTEGER

RW

alNone

W

 

Align determines how the control aligns within its parent control.

ClientHeight

INTEGER

RW

 

W

ClientWidth

INTEGER

RW

 

W

Color

INTEGER

RW

 

WXG

CopyMode

INTEGER

RW

cmBlackness

W

Cursor

INTEGER

RW

crDefault

W

Enabled

INTEGER

RW

True

WXG

Font

QFONT

W

 

W

Height

INTEGER

RW

24

WXG

Hint

STRING

RW

 

W

Left

INTEGER

RW

0

WXG

Parent

QFORM/QPANEL/QTABCONTROL

W

 

WXG

Pixel

2D ARRAY of INTEGER

RW

 

WXG

PopupMenu

QPOPUPMENU

W

 

W

ShowHint

INTEGER

RW

False

W

Tag

INTEGER

RW

 

WXG

Top

INTEGER

RW

0

WXG

Width

INTEGER

RW

12

WXG

Visible

INTEGER

RW

True

WXG

Display

STRING

RW

0

W

 

 


QDigDisplay Events

Event

Type

Occurs when...

Params

Support






OnClick

VOID

User clicked on canvas

0

WXG

OnDblClick

VOID

User double clicked on canvas

0

W

OnMouseDown

SUB (Button%, X%, Y%, Shift%)

Mouse button held down

4

WXG

OnMouseMove

SUB (X%, Y%, Shift%)

Mouse moves

3

WXG

OnMouseUp

SUB (Button%, X%, Y%, Shift%)

Mouse button is released

4

WXG

OnPaint

VOID

Receives WM_PAINT message

0

WXG



QDigDisplay Example

 
' Count from 0 to 100
 
$INCLUDE RAPIDQ.INC 
$INCLUDE QDIGDISPLAY.INC
 
DECLARE SUB CountLoop
 
CREATE Form AS QFORM
CREATE Button AS QBUTTON
 Left = 100
 Top = 120
 Caption = Start Count
 OnClick = CountLoop
END CREATE
CREATE Counter AS QDIGDISPLAY
 Left = 20
 Top = 80
 Display = 000
END CREATE
END CREATE
Form.ShowModal
 
SUB CountLoop
FOR Loop1 = 0 TO 100
 Counter.Display = RIGHT$ (000+ STR$(Loop1),3)
 Form.Repaint 
 SLEEP 1
NEXT
END SUB

 

Hosted by uCoz