Методы:
Stop(), Start()
Свойства:
Interval, FontName, FontSize, FontBold, FontItalic,
ForeColor, Alignment.
Определение
класса:
DEFINE
CLASS runline AS container
Width
= 158
Height = 28
BackStyle = 0
BorderWidth = 0
Name = "runline"
*--
Specifies the text displayed in an object's caption.
caption = ‘’
*--
Specifies if the text is italic.
fontitalic = .F.
*--
Specifies if the text is bold.
fontbold = .F.
*--
Specifies the font size for text displayed with an object.
fontsize = 10
*--
Specifies the name of the font used to display text.
fontname = 'Arial'
*--
Specifies the number of milliseconds between calls to a
Timer control's Timer event.
interval = 500
*--
Specifies the alignment of text associated with a control.
alignment = 0
ADD
OBJECT text AS label WITH ;
AutoSize = .F., ;
BackStyle = 0, ;
Caption = "Label1", ;
Height = 17, ;
Left = 0, ;
Top = 6, ;
Width = 40, ;
Name = "Text"
ADD
OBJECT timer AS timer WITH ;
Top = 3, ;
Left = 129, ;
Height = 23, ;
Width = 23, ;
Interval = 500, ;
Name = "Timer"
PROCEDURE
caption_access
RETURN THIS.Text.Caption
ENDPROC
PROCEDURE
caption_assign
LPARAMETERS vNewVal
THIS.Text.Caption = m.vNewVal
ENDPROC
PROCEDURE
forecolor_access
RETURN THIS.Text.ForeColor
ENDPROC
PROCEDURE
forecolor_assign
LPARAMETERS vNewVal
THIS.Text.ForeColor = m.vNewVal
ENDPROC
PROCEDURE
fontitalic_access
RETURN THIS.Text.FontItalic
ENDPROC
PROCEDURE
fontitalic_assign
LPARAMETERS vNewVal
THIS.Text.FontItalic = m.vNewVal
ENDPROC
PROCEDURE
fontbold_access
RETURN THIS.Text.FontBold
ENDPROC
PROCEDURE
fontbold_assign
LPARAMETERS vNewVal
THIS.Text.FontBold = m.vNewVal
ENDPROC
PROCEDURE
fontsize_access
RETURN THIS.Text.FontSize
ENDPROC
PROCEDURE
fontsize_assign
LPARAMETERS vNewVal
THIS.Text.FontSize = m.vNewVal
ENDPROC
PROCEDURE
fontname_access
RETURN THIS.Text.FontName
ENDPROC
PROCEDURE
fontname_assign
LPARAMETERS vNewVal
THIS.Text.FontName = m.vNewVal
ENDPROC
PROCEDURE
interval_access
RETURN THIS.Timer.Interval
ENDPROC
PROCEDURE
interval_assign
LPARAMETERS vNewVal
THIS.Timer.Interval = m.vNewVal
ENDPROC
PROCEDURE
start
THIS.Timer.Enabled=.T.
ENDPROC
PROCEDURE
stop
THIS.Timer.Enabled=.F.
ENDPROC
PROCEDURE
alignment_access
RETURN THIS.Text.Alignment
ENDPROC
PROCEDURE
alignment_assign
LPARAMETERS vNewVal
THIS.Text.Alignment = m.vNewVal
ENDPROC
PROCEDURE
Init
THIS.text.Width=THIS.Width
THIS.text.Height=THIS.Height
ENDPROC
PROCEDURE
timer.Timer
LOCAL lcFirstChar, lcSubLine
lcFirstChar=SUBSTR(THIS.PARENT.Text.Caption,1,1)
lcSubLine=SUBSTR(THIS.PARENT.Text.Caption,2)
THIS.PARENT.Text.Caption=lcSubLine+lcFirstChar
ENDPROC
ENDDEFINE