home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 March
/
Chip_2002-03_cd1.bin
/
zkuste
/
delphi
/
kompon
/
d56
/
SCLED10.ZIP
/
SCLED10
/
DEMO
/
SCLEDDemo_MainUnit.~dfm
< prev
next >
Wrap
Text File
|
2001-12-30
|
20KB
|
753 lines
object DemoForm: TDemoForm
Left = 201
Top = 185
BorderStyle = bsSingle
Caption =
'TSCLED 1.0 Demo by Safak Cinar, Dec 29 2001, http://members.shaw' +
'.ca/safak/'
ClientHeight = 475
ClientWidth = 686
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object PageControl1: TPageControl
Left = 0
Top = 0
Width = 686
Height = 475
ActivePage = TabSheet4
Align = alClient
TabOrder = 0
TabWidth = 90
OnChange = PageControl1Change
object TabSheet4: TTabSheet
Caption = 'About'
ImageIndex = 3
object Label10: TLabel
Left = 8
Top = 104
Width = 245
Height = 20
Caption = 'http://members.shaw.ca/safak/'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold, fsUnderline]
ParentFont = False
OnClick = Label10Click
end
object Label11: TLabel
Left = 8
Top = 136
Width = 180
Height = 20
Caption = 'mailto:safak@shaw.ca'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold, fsUnderline]
ParentFont = False
OnClick = Label10Click
end
object Label12: TLabel
Left = 8
Top = 72
Width = 207
Height = 20
Caption = 'Safak Cinar, Dec 29 2001'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label13: TLabel
Left = 336
Top = 72
Width = 335
Height = 16
Alignment = taRightJustify
Caption = '(based on the component TDynaLED 1.0 by Samson Fu)'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object LED5: TSCLED
Left = 8
Top = 8
Width = 665
Height = 49
LEDCountX = 221
LEDCountY = 16
AlignmentH = schaCenter
AlignmentV = scvaCenter
Caption = 'TSCLED 1.0'
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
ParentColor = False
end
object RichEdit5: TRichEdit
Left = 0
Top = 176
Width = 678
Height = 271
Align = alBottom
Alignment = taCenter
BorderStyle = bsNone
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'MS Sans Serif'
Font.Style = []
Lines.Strings = (
'You are free to use and modify this component in any project'
'(freeware or commercial) but cannot sell or distribute'
'the component itself (whether as source code or in'
'compiled form), individually or bundled in a package without'
'prior written consent from the author.'
''
'That out of the way, feel free to modify the code. If you publis' +
'h'
'your own component based on this one, make it freeware with'
'full source code and drop me a note. Alternatively, you can send'
'me your ideas, suggestions and bug reports and I will try to inc' +
'lude'
'the functionality in the next version, with proper credit of cou' +
'rse.')
ParentColor = True
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 0
end
end
object TabSheet1: TTabSheet
Caption = 'Basics'
object LED1: TSCLED
Left = 8
Top = 8
Width = 249
Height = 137
Lines.Strings = (
'SCLED'
'TEST')
ForeColor = clRed
BackColor = clMaroon
LEDCountX = 83
LEDCountY = 45
AlignmentH = schaCenter
AlignmentV = scvaCenter
OnAfterDrawText = LED1AfterDrawText
AutoSize = False
Caption = 'LED1'
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
ParentColor = False
end
object Label1: TLabel
Left = 8
Top = 152
Width = 28
Height = 13
Caption = 'Lines:'
end
object ForePanel: TPanel
Left = 208
Top = 152
Width = 49
Height = 25
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Fore'
TabOrder = 0
OnClick = ForePanelClick
end
object BackPanel: TPanel
Left = 208
Top = 176
Width = 49
Height = 25
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Back'
TabOrder = 1
OnClick = BackPanelClick
end
object ColorPanel: TPanel
Left = 208
Top = 200
Width = 49
Height = 25
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Color'
TabOrder = 2
OnClick = ColorPanelClick
end
object LinesMemo: TMemo
Left = 40
Top = 152
Width = 161
Height = 57
TabOrder = 3
WordWrap = False
OnChange = LinesMemoChange
end
object FontButton: TButton
Left = 208
Top = 246
Width = 49
Height = 25
Caption = 'Font'
TabOrder = 4
OnClick = FontButtonClick
end
object GroupBox1: TGroupBox
Left = 5
Top = 240
Width = 97
Height = 57
Caption = 'LED Style'
TabOrder = 5
object Style1Radio: TRadioButton
Left = 8
Top = 16
Width = 81
Height = 17
Caption = 'sclsSquare'
TabOrder = 0
OnClick = StyleRadioClick
end
object Style2Radio: TRadioButton
Left = 8
Top = 32
Width = 81
Height = 17
Caption = 'sclsRound'
TabOrder = 1
OnClick = StyleRadioClick
end
end
object GroupBox2: TGroupBox
Left = 104
Top = 240
Width = 97
Height = 57
Caption = 'Clip Mode'
TabOrder = 6
object Clip1Radio: TRadioButton
Left = 8
Top = 16
Width = 81
Height = 17
Caption = 'sccmText'
TabOrder = 0
OnClick = ClipModeRadioClick
end
object Clip2Radio: TRadioButton
Left = 8
Top = 32
Width = 81
Height = 17
Caption = 'sccmDisplay'
TabOrder = 1
OnClick = ClipModeRadioClick
end
end
object AfterDrawCheck: TCheckBox
Left = 40
Top = 216
Width = 129
Height = 17
Caption = 'Enable OnAfterDraw'
TabOrder = 7
OnClick = AfterDrawCheckClick
end
object RichEdit1: TRichEdit
Left = 264
Top = 0
Width = 414
Height = 447
Align = alRight
ParentColor = True
PlainText = True
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 8
end
object GroupBox3: TGroupBox
Left = 5
Top = 298
Width = 97
Height = 65
Caption = 'LED'
TabOrder = 9
object Label4: TLabel
Left = 9
Top = 18
Width = 23
Height = 13
Caption = 'Size:'
end
object Label5: TLabel
Left = 11
Top = 42
Width = 21
Height = 13
Caption = 'Dist:'
end
object SizeCombo: TComboBox
Left = 40
Top = 14
Width = 49
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 0
OnChange = SizeComboChange
Items.Strings = (
'1'
'2'
'3'
'4'
'5'
'6'
'7'
'8')
end
object DistCombo: TComboBox
Left = 40
Top = 38
Width = 49
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 1
OnChange = DistComboChange
Items.Strings = (
'0'
'1'
'2'
'3'
'4')
end
end
object GroupBox4: TGroupBox
Left = 104
Top = 298
Width = 153
Height = 65
Caption = 'Alignment'
TabOrder = 10
object Label2: TLabel
Left = 13
Top = 18
Width = 11
Height = 13
Caption = 'H:'
end
object Label3: TLabel
Left = 14
Top = 42
Width = 10
Height = 13
Caption = 'V:'
end
object HAlignCombo: TComboBox
Left = 32
Top = 14
Width = 113
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 0
OnChange = HAlignComboChange
Items.Strings = (
'scvaLeft'
'scvaCenter'
'scvaRight')
end
object VAlignCombo: TComboBox
Left = 32
Top = 38
Width = 113
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 1
OnChange = VAlignComboChange
Items.Strings = (
'scvaTop'
'scvaCenter'
'scvaBottom')
end
end
object GroupBox5: TGroupBox
Left = 8
Top = 366
Width = 249
Height = 73
Caption = 'Offset'
TabOrder = 11
object Label6: TLabel
Left = 8
Top = 21
Width = 10
Height = 13
Caption = 'X:'
end
object Label7: TLabel
Left = 8
Top = 48
Width = 10
Height = 13
Caption = 'Y:'
end
object OffsetXBox: TEdit
Left = 32
Top = 17
Width = 41
Height = 21
TabOrder = 0
Text = '0'
OnChange = OffsetXBoxChange
end
object OffsetXTrack: TTrackBar
Left = 72
Top = 16
Width = 169
Height = 25
Max = 20
Min = -20
Orientation = trHorizontal
Frequency = 1
Position = 0
SelEnd = 0
SelStart = 0
TabOrder = 1
TickMarks = tmBottomRight
TickStyle = tsNone
OnChange = OffsetXTrackChange
end
object OffsetYBox: TEdit
Left = 32
Top = 44
Width = 41
Height = 21
TabOrder = 2
Text = '0'
OnChange = OffsetYBoxChange
end
object OffsetYTrack: TTrackBar
Left = 72
Top = 43
Width = 169
Height = 25
Max = 20
Min = -20
Orientation = trHorizontal
Frequency = 1
Position = 0
SelEnd = 0
SelStart = 0
TabOrder = 3
TickMarks = tmBottomRight
TickStyle = tsNone
OnChange = OffsetYTrackChange
end
end
end
object TabSheet2: TTabSheet
Caption = 'Animation'
ImageIndex = 1
object LED2: TSCLED
Left = 5
Top = 1
Width = 241
Height = 145
Lines.Strings = (
'TESTING'
'SCLED'
'ANIMATION')
LEDCountX = 80
LEDCountY = 48
ClipMode = sccmDisplay
AlignmentH = schaCenter
AlignmentV = scvaCenter
OnAfterDrawText = LED2AfterDrawText
Caption = 'LED2'
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
ParentColor = False
end
object AnimsCombo: TComboBox
Left = 2
Top = 181
Width = 674
Height = 23
Style = csDropDownList
DropDownCount = 20
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Fixedsys'
Font.Style = []
ItemHeight = 15
ParentFont = False
TabOrder = 2
OnChange = AnimsComboChange
Items.Strings = (
'LED2.Animate(1,200,10,0,0,0);'
'LED2.Animate(2,200,10,0,0,0);'
'LED2.Animate(3,200,10,0,0,0);'
'LED2.Animate(4,1,36,10,LED2.Bitmap.Width Div 2,0);'
'LED2.Animate(5,1,36,10,LED2.Bitmap.Height Div 2,0);'
'LED2.Animate(6,1,36,10,LED2.Bitmap.Width Div 2,0);'
'LED2.Animate(7,1,36,10,LED2.Bitmap.Height Div 2,0);'
'LED2.Animate(8,1,144,5,LED2.Bitmap.Width Div 2,LED2.Bitmap.Heigh' +
't Div 2);'
'LED2.Animate(9,1,72,5,LED2.Bitmap.Width Div 2,LED2.Bitmap.Height' +
' Div 2);'
'LED2.Animate(10,1,LED2.LEDCountX,2,LED2.LEDCountX*2,0);'
'LED2.Animate(11,1,LED2.LEDCountY,2,LED2.LEDCountY*2,0);'
'LED2.Animate(12,1,LED2.LEDCountX,4,0,0);'
'LED2.Animate(13,1,LED2.LEDCountY,4,0,0);')
end
object CycleAnimation: TButton
Left = 48
Top = 152
Width = 75
Height = 25
Caption = 'Cycle All'
TabOrder = 0
OnClick = CycleAnimationClick
end
object StopCycleButton: TButton
Left = 128
Top = 152
Width = 75
Height = 25
Caption = 'Stop Cycle'
TabOrder = 1
OnClick = StopCycleButtonClick
end
object RichEdit2: TRichEdit
Left = 256
Top = 2
Width = 417
Height = 176
BorderStyle = bsNone
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Fixedsys'
Font.Style = []
Lines.Strings = (
'The rectangle around the text is drawn by '
'assigning some code to the OnAfterDrawText '
'event handler:'
''
'procedure TForm.LED2AfterDrawText(Sender:TObject);'
'begin'
' with LED2.Bitmap.Canvas do'
' Brush.Color:=clWhite;'
' FrameRect(ClipRect);'
' end;'
'end;')
ParentColor = True
ParentFont = False
ReadOnly = True
TabOrder = 3
WordWrap = False
end
object RichEdit3: TRichEdit
Left = 0
Top = 205
Width = 678
Height = 242
Align = alBottom
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'Fixedsys'
Font.Style = []
ParentColor = True
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 4
WordWrap = False
end
end
object TabSheet3: TTabSheet
Caption = 'More examples'
ImageIndex = 2
object LED3: TSCLED
Left = 8
Top = 8
Width = 161
Height = 65
ForeColor = clYellow
BackColor = 24158
LEDSize = 3
LEDCountX = 40
LEDCountY = 16
LEDStyle = sclsRound
AlignmentH = schaLeft
AlignmentV = scvaCenter
Caption =
'This is a long caption so if you want to be able to see it all w' +
'hen scrolling, set ClipMode to sccmText...'
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
ParentColor = False
end
object LED4: TSCLED
Left = 7
Top = 112
Width = 641
Height = 21
LEDSize = 19
LEDCountX = 32
LEDCountY = 1
LEDStyle = sclsRound
ClipMode = sccmDisplay
AlignmentH = schaCenter
AlignmentV = scvaCenter
Color = clBlack
ParentColor = False
end
object Label8: TLabel
Left = 8
Top = 80
Width = 528
Height = 15
Caption =
'LED3.Animate(10,50,LED3.Bitmap.Width+50,1,LED3.Bitmap.Width+50,0' +
');'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Fixedsys'
Font.Style = []
ParentFont = False
end
object ScrollButton: TButton
Left = 174
Top = 48
Width = 99
Height = 25
Caption = 'Scroll'
TabOrder = 0
OnClick = ScrollButtonClick
end
object NumberBox: TEdit
Left = 7
Top = 139
Width = 137
Height = 21
TabOrder = 1
Text = '0'
OnChange = NumberBoxChange
end
object RichEdit4: TRichEdit
Left = 8
Top = 168
Width = 665
Height = 273
BorderStyle = bsNone
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Fixedsys'
Font.Style = []
Lines.Strings = (
'Procedure TDemoForm.NumberBoxChange(Sender: TObject);'
'Var'
' i,m,n : integer;'
'Begin'
' Try n:=StrToInt(NumberBox.Text); Except On Exception Do n:=0; ' +
'End;'
' m:=1;'
' With LED4.Bitmap.Canvas Do'
' For i:=0 To 31 Do'
' Begin'
' If (n And m)<>0 Then Pixels[31-i,0]:=clWhite'
' Else Pixels[31-i,0]:=clBlack;'
' m:=m SHL 1;'
' End;'
' LED4.BitmapChanged;'
'End;')
ParentColor = True
ParentFont = False
ReadOnly = True
TabOrder = 2
end
object Button1: TButton
Left = 152
Top = 138
Width = 75
Height = 25
Caption = 'Count'
TabOrder = 3
OnClick = Button1Click
end
end
end
object ColorDialog: TColorDialog
Ctl3D = True
Left = 228
Top = 40
end
object FontDialog: TFontDialog
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
MinFontSize = 0
MaxFontSize = 0
Left = 228
Top = 136
end
end