GradButton: Fixed Repaint at OwnerBackgroundDraw
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@859 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
90dba7a8e3
commit
e8729f32a8
@ -1,108 +1,107 @@
|
||||
object Form1: TForm1
|
||||
Left = 473
|
||||
Height = 443
|
||||
Top = 192
|
||||
Left = 89
|
||||
Height = 439
|
||||
Top = 159
|
||||
Width = 576
|
||||
ActiveControl = TrackBar1
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'TGradButton-Demo'
|
||||
ClientHeight = 443
|
||||
ClientHeight = 439
|
||||
ClientWidth = 576
|
||||
OnCreate = FormCreate
|
||||
ParentFont = False
|
||||
LCLVersion = '0.9.27'
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 75
|
||||
Width = 60
|
||||
Width = 71
|
||||
Caption = 'NormalBlend'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 8
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 131
|
||||
Width = 51
|
||||
Width = 56
|
||||
Caption = 'OverBlend'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 88
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 75
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 88
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 131
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 37
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 52
|
||||
Width = 57
|
||||
Caption = 'Base Color'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 133
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 91
|
||||
Width = 106
|
||||
Caption = 'Normal Blend Color'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label7: TLabel
|
||||
Left = 240
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 82
|
||||
Width = 91
|
||||
Caption = 'Over Blend Color'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 488
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 128
|
||||
Width = 28
|
||||
Width = 32
|
||||
Caption = 'Glyph'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label9: TLabel
|
||||
Left = 461
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 176
|
||||
Width = 87
|
||||
Width = 99
|
||||
Caption = 'Glyph Background'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label10: TLabel
|
||||
Left = 472
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 50
|
||||
Width = 59
|
||||
Caption = 'Click Color'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label11: TLabel
|
||||
Left = 464
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 72
|
||||
Width = 69
|
||||
Width = 78
|
||||
Caption = 'Disabled Color'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label12: TLabel
|
||||
Left = 368
|
||||
Height = 14
|
||||
Height = 16
|
||||
Top = 16
|
||||
Width = 51
|
||||
Width = 55
|
||||
Caption = 'Text Color'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -113,6 +112,7 @@ object Form1: TForm1
|
||||
Width = 440
|
||||
Max = 100000
|
||||
OnChange = TrackBar1Change
|
||||
Position = 0
|
||||
ScalePos = trBottom
|
||||
TickStyle = tsNone
|
||||
Align = alCustom
|
||||
@ -125,6 +125,7 @@ object Form1: TForm1
|
||||
Width = 440
|
||||
Max = 100000
|
||||
OnChange = TrackBar2Change
|
||||
Position = 0
|
||||
ScalePos = trBottom
|
||||
TabStop = False
|
||||
TickStyle = tsNone
|
||||
@ -290,18 +291,17 @@ object Form1: TForm1
|
||||
end
|
||||
object LabeledEdit1: TLabeledEdit
|
||||
Left = 328
|
||||
Height = 23
|
||||
Height = 25
|
||||
Top = 216
|
||||
Width = 80
|
||||
EditLabel.AnchorSideLeft.Control = LabeledEdit1
|
||||
EditLabel.AnchorSideBottom.Control = LabeledEdit1
|
||||
EditLabel.Left = 328
|
||||
EditLabel.Height = 14
|
||||
EditLabel.Top = 199
|
||||
EditLabel.Width = 73
|
||||
EditLabel.Height = 16
|
||||
EditLabel.Top = 197
|
||||
EditLabel.Width = 82
|
||||
EditLabel.Caption = 'Button Caption'
|
||||
EditLabel.ParentColor = False
|
||||
ParentColor = False
|
||||
TabOrder = 7
|
||||
Text = 'Sample Text'
|
||||
OnKeyUp = LabeledEdit1KeyUp
|
||||
@ -314,6 +314,7 @@ object Form1: TForm1
|
||||
Caption = 'Sample Text'
|
||||
Font.Color = clWhite
|
||||
Font.Height = -15
|
||||
OnClick = bClick
|
||||
TabOrder = 9
|
||||
TabStop = True
|
||||
NormalBlend = 0.5
|
||||
@ -324,8 +325,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -347,8 +350,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -370,8 +375,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -393,8 +400,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -416,8 +425,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -439,8 +450,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -462,8 +475,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -485,8 +500,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -503,7 +520,7 @@ object Form1: TForm1
|
||||
Left = 327
|
||||
Height = 19
|
||||
Top = 261
|
||||
Width = 46
|
||||
Width = 44
|
||||
Caption = 'Bold'
|
||||
OnChange = BoldCheckBoxChange
|
||||
TabOrder = 18
|
||||
@ -526,8 +543,10 @@ object Form1: TForm1
|
||||
OverBlendColor = clSilver
|
||||
BackgroundColor = clBtnFace
|
||||
ShowFocusBorder = True
|
||||
ShowGlyph = False
|
||||
GlyphBackgroundColor = clWhite
|
||||
ClickColor = clBlue
|
||||
OwnerBackgroundDraw = False
|
||||
AutoWidthBorderSpacing = 15
|
||||
AutoHeightBorderSpacing = 15
|
||||
end
|
||||
@ -535,7 +554,7 @@ object Form1: TForm1
|
||||
Left = 327
|
||||
Height = 19
|
||||
Top = 280
|
||||
Width = 49
|
||||
Width = 45
|
||||
Caption = 'Italic'
|
||||
OnChange = ItalicCheckBoxChange
|
||||
TabOrder = 20
|
||||
@ -544,13 +563,35 @@ object Form1: TForm1
|
||||
Left = 448
|
||||
Height = 19
|
||||
Top = 220
|
||||
Width = 115
|
||||
Width = 117
|
||||
Caption = 'Glyph Transparent'
|
||||
OnChange = GlyphTransparentCheckBoxChange
|
||||
TabOrder = 21
|
||||
end
|
||||
object ColorDialog1: TColorDialog
|
||||
Color = 11954481
|
||||
CustomColors.Strings = (
|
||||
'ColorA=000000'
|
||||
'ColorB=000080'
|
||||
'ColorC=008000'
|
||||
'ColorD=008080'
|
||||
'ColorE=800000'
|
||||
'ColorF=800080'
|
||||
'ColorG=808000'
|
||||
'ColorH=808080'
|
||||
'ColorI=C0C0C0'
|
||||
'ColorJ=0000FF'
|
||||
'ColorK=00FF00'
|
||||
'ColorL=00FFFF'
|
||||
'ColorM=FF0000'
|
||||
'ColorN=FF00FF'
|
||||
'ColorO=FFFF00'
|
||||
'ColorP=FFFFFF'
|
||||
'ColorQ=C0DCC0'
|
||||
'ColorR=F0CAA6'
|
||||
'ColorS=F0FBFF'
|
||||
'ColorT=A4A0A0'
|
||||
)
|
||||
left = 8
|
||||
top = 176
|
||||
end
|
||||
|
@ -1,188 +1,198 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#217#1#6'Height'#3#187#1#3'Top'#3#192#0#5
|
||||
+'Width'#3'@'#2#13'ActiveControl'#7#9'TrackBar1'#11'BorderIcons'#11#12'biSyst'
|
||||
+'emMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#16'TGra'
|
||||
+'dButton-Demo'#12'ClientHeight'#3#187#1#11'ClientWidth'#3'@'#2#8'OnCreate'#7
|
||||
+#10'FormCreate'#10'ParentFont'#8#10'LCLVersion'#6#6'0.9.27'#0#6'TLabel'#6'La'
|
||||
+'bel1'#4'Left'#2#8#6'Height'#2#14#3'Top'#2'K'#5'Width'#2'<'#7'Caption'#6#11
|
||||
+'NormalBlend'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'
|
||||
+#2#14#3'Top'#3#131#0#5'Width'#2'3'#7'Caption'#6#9'OverBlend'#11'ParentColor'
|
||||
+#8#0#0#6'TLabel'#6'Label3'#4'Left'#2'X'#6'Height'#2#14#3'Top'#2'K'#5'Width'#2
|
||||
+#1#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#2'X'#6'Height'#2#14#3'T'
|
||||
+'op'#3#131#0#5'Width'#2#1#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2
|
||||
+'%'#6'Height'#2#14#3'Top'#2#16#5'Width'#2'4'#7'Caption'#6#10'Base Color'#11
|
||||
+'ParentColor'#8#0#0#6'TLabel'#6'Label6'#4'Left'#3#133#0#6'Height'#2#14#3'Top'
|
||||
+#2#16#5'Width'#2'['#7'Caption'#6#18'Normal Blend Color'#11'ParentColor'#8#0#0
|
||||
+#6'TLabel'#6'Label7'#4'Left'#3#240#0#6'Height'#2#14#3'Top'#2#16#5'Width'#2'R'
|
||||
+#7'Caption'#6#16'Over Blend Color'#11'ParentColor'#8#0#0#6'TLabel'#6'Label8'
|
||||
+#4'Left'#3#232#1#6'Height'#2#14#3'Top'#3#128#0#5'Width'#2#28#7'Caption'#6#5
|
||||
+'Glyph'#11'ParentColor'#8#0#0#6'TLabel'#6'Label9'#4'Left'#3#205#1#6'Height'#2
|
||||
+#14#3'Top'#3#176#0#5'Width'#2'W'#7'Caption'#6#16'Glyph Background'#11'Parent'
|
||||
+'Color'#8#0#0#6'TLabel'#7'Label10'#4'Left'#3#216#1#6'Height'#2#14#3'Top'#2#16
|
||||
+#5'Width'#2'2'#7'Caption'#6#11'Click Color'#11'ParentColor'#8#0#0#6'TLabel'#7
|
||||
+'Label11'#4'Left'#3#208#1#6'Height'#2#14#3'Top'#2'H'#5'Width'#2'E'#7'Caption'
|
||||
+#6#14'Disabled Color'#11'ParentColor'#8#0#0#6'TLabel'#7'Label12'#4'Left'#3'p'
|
||||
+#1#6'Height'#2#14#3'Top'#2#16#5'Width'#2'3'#7'Caption'#6#10'Text Color'#11'P'
|
||||
+'arentColor'#8#0#0#9'TTrackBar'#9'TrackBar1'#4'Left'#2#8#6'Height'#2#30#3'To'
|
||||
+'p'#2'`'#5'Width'#3#184#1#3'Max'#4#160#134#1#0#8'OnChange'#7#15'TrackBar1Cha'
|
||||
+'nge'#8'ScalePos'#7#8'trBottom'#9'TickStyle'#7#6'tsNone'#5'Align'#7#8'alCust'
|
||||
+'om'#8'TabOrder'#2#0#0#0#9'TTrackBar'#9'TrackBar2'#4'Left'#2#8#6'Height'#2#30
|
||||
+#3'Top'#3#152#0#5'Width'#3#184#1#3'Max'#4#160#134#1#0#8'OnChange'#7#15'Track'
|
||||
+'Bar2Change'#8'ScalePos'#7#8'trBottom'#7'TabStop'#8#9'TickStyle'#7#6'tsNone'
|
||||
+#5'Align'#7#8'alCustom'#8'TabOrder'#2#1#0#0#11'TCheckGroup'#11'CheckGroup1'#4
|
||||
+'Left'#2#8#6'Height'#2'i'#3'Top'#3'@'#1#5'Width'#3#129#0#8'AutoFill'#9#7'Cap'
|
||||
+'tion'#6#12'Border Sides'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizin'
|
||||
+'g.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenou'
|
||||
+'sChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'
|
||||
+#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shrink'
|
||||
+'Vertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightTh'
|
||||
+'enTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#13'Items.Strings'#1#6#12
|
||||
+'bsBottomLine'#6#9'bsTopLine'#6#10'bsLeftLine'#6#11'bsRightLine'#0#11'OnItem'
|
||||
+'Click'#7#20'CheckGroup1ItemClick'#8'TabOrder'#2#4#4'Data'#10#8#0#0#0#4#0#0#0
|
||||
+#2#2#2#2#0#0#11'TCheckGroup'#11'CheckGroup2'#4'Left'#2#8#6'Height'#2'Y'#3'To'
|
||||
+'p'#3#216#0#5'Width'#3#129#0#8'AutoFill'#9#7'Caption'#6#5'Other'#28'ChildSiz'
|
||||
+'ing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizi'
|
||||
+'ng.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlarge'
|
||||
+'Vertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7
|
||||
+#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'C'
|
||||
+'hildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Contr'
|
||||
+'olsPerLine'#2#1#13'Items.Strings'#1#6#15'ShowFocusBorder'#6#9'ShowGlyph'#6#7
|
||||
+'Enabled'#0#11'OnItemClick'#7#20'CheckGroup2ItemClick'#8'TabOrder'#2#6#4'Dat'
|
||||
+'a'#10#7#0#0#0#3#0#0#0#2#2#2#0#0#11'TRadioGroup'#11'RadioGroup1'#4'Left'#3
|
||||
+#176#1#6'Height'#2'A'#3'Top'#3#240#0#5'Width'#3#129#0#8'AutoFill'#9#7'Captio'
|
||||
+'n'#6#13'Gradient Type'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.'
|
||||
+'TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousC'
|
||||
+'hildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'
|
||||
+#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shrink'
|
||||
+'Vertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightTh'
|
||||
+'enTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'/'#11
|
||||
+'ClientWidth'#2'}'#9'ItemIndex'#2#0#13'Items.Strings'#1#6#12'gtHorizontal'#6
|
||||
+#10'gtVertical'#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrder'#2#8#0#0#11'T'
|
||||
+'RadioGroup'#11'RadioGroup2'#4'Left'#3#151#0#6'Height'#2'i'#3'Top'#3'@'#1#5
|
||||
+'Width'#3#129#0#8'AutoFill'#9#7'Caption'#6#17'Rotated Direction'#28'ChildSiz'
|
||||
+'ing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizi'
|
||||
+'ng.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlarge'
|
||||
+'Vertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7
|
||||
,#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'C'
|
||||
+'hildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Contr'
|
||||
+'olsPerLine'#2#1#12'ClientHeight'#2'W'#11'ClientWidth'#2'}'#9'ItemIndex'#2#0
|
||||
+#13'Items.Strings'#1#6#8'rdNormal'#6#6'rdLeft'#6#7'rdRight'#0#7'OnClick'#7#16
|
||||
+'RadioGroup2Click'#8'TabOrder'#2#2#0#0#11'TRadioGroup'#11'RadioGroup3'#4'Lef'
|
||||
+'t'#3'('#1#6'Height'#2'i'#3'Top'#3'@'#1#5'Width'#2'y'#8'AutoFill'#9#7'Captio'
|
||||
+'n'#6#13'Button Layout'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.'
|
||||
+'TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousC'
|
||||
+'hildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'
|
||||
+#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Shrink'
|
||||
+'Vertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightTh'
|
||||
+'enTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'W'#11
|
||||
+'ClientWidth'#2'u'#9'ItemIndex'#2#1#13'Items.Strings'#1#6#12'blGlyphRight'#6
|
||||
+#11'blGlyphLeft'#6#10'blGlyphTop'#6#13'blGlyphBottom'#0#7'OnClick'#7#16'Radi'
|
||||
+'oGroup3Click'#8'TabOrder'#2#3#0#0#11'TRadioGroup'#11'RadioGroup4'#4'Left'#3
|
||||
+#176#1#6'Height'#2'j'#3'Top'#3'@'#1#5'Width'#3#129#0#8'AutoFill'#9#7'Caption'
|
||||
+#6#14'Text Alignment'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.To'
|
||||
+'pBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChi'
|
||||
+'ldResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
|
||||
+'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
|
||||
+'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
|
||||
+'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'X'#11'Cl'
|
||||
+'ientWidth'#2'}'#9'ItemIndex'#2#0#13'Items.Strings'#1#6#8'taCenter'#6#13'taL'
|
||||
+'eftJustify'#6#14'taRightJustify'#0#7'OnClick'#7#16'RadioGroup4Click'#8'TabO'
|
||||
+'rder'#2#5#0#0#12'TLabeledEdit'#12'LabeledEdit1'#4'Left'#3'H'#1#6'Height'#2
|
||||
+#23#3'Top'#3#216#0#5'Width'#2'P EditLabel.AnchorSideLeft.Control'#7#12'Label'
|
||||
+'edEdit1"EditLabel.AnchorSideBottom.Control'#7#12'LabeledEdit1'#14'EditLabel'
|
||||
+'.Left'#3'H'#1#16'EditLabel.Height'#2#14#13'EditLabel.Top'#3#199#0#15'EditLa'
|
||||
+'bel.Width'#2'I'#17'EditLabel.Caption'#6#14'Button Caption'#21'EditLabel.Par'
|
||||
+'entColor'#8#11'ParentColor'#8#8'TabOrder'#2#7#4'Text'#6#11'Sample Text'#7'O'
|
||||
+'nKeyUp'#7#17'LabeledEdit1KeyUp'#0#0#11'TGradButton'#1'b'#4'Left'#3#152#0#6
|
||||
+'Height'#2'`'#3'Top'#3#200#0#5'Width'#3#168#0#7'Caption'#6#11'Sample Text'#10
|
||||
+'Font.Color'#7#7'clWhite'#11'Font.Height'#2#241#8'TabOrder'#2#9#7'TabStop'#9
|
||||
+#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#2'Y'#6'Height'#3#183#1#3'Top'#3#159#0#5'Wid'
|
||||
+'th'#3'@'#2#13'ActiveControl'#7#9'TrackBar1'#11'BorderIcons'#11#12'biSystemM'
|
||||
+'enu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#16'TGradBu'
|
||||
+'tton-Demo'#12'ClientHeight'#3#183#1#11'ClientWidth'#3'@'#2#8'OnCreate'#7#10
|
||||
+'FormCreate'#10'LCLVersion'#6#6'0.9.27'#0#6'TLabel'#6'Label1'#4'Left'#2#8#6
|
||||
+'Height'#2#16#3'Top'#2'K'#5'Width'#2'G'#7'Caption'#6#11'NormalBlend'#11'Pare'
|
||||
+'ntColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#16#3'Top'#3#131#0
|
||||
+#5'Width'#2'8'#7'Caption'#6#9'OverBlend'#11'ParentColor'#8#0#0#6'TLabel'#6'L'
|
||||
+'abel3'#4'Left'#2'X'#6'Height'#2#16#3'Top'#2'K'#5'Width'#2#1#11'ParentColor'
|
||||
+#8#0#0#6'TLabel'#6'Label4'#4'Left'#2'X'#6'Height'#2#16#3'Top'#3#131#0#5'Widt'
|
||||
+'h'#2#1#11'ParentColor'#8#0#0#6'TLabel'#6'Label5'#4'Left'#2'%'#6'Height'#2#16
|
||||
+#3'Top'#2#16#5'Width'#2'9'#7'Caption'#6#10'Base Color'#11'ParentColor'#8#0#0
|
||||
+#6'TLabel'#6'Label6'#4'Left'#3#133#0#6'Height'#2#16#3'Top'#2#16#5'Width'#2'j'
|
||||
+#7'Caption'#6#18'Normal Blend Color'#11'ParentColor'#8#0#0#6'TLabel'#6'Label'
|
||||
+'7'#4'Left'#3#240#0#6'Height'#2#16#3'Top'#2#16#5'Width'#2'['#7'Caption'#6#16
|
||||
+'Over Blend Color'#11'ParentColor'#8#0#0#6'TLabel'#6'Label8'#4'Left'#3#232#1
|
||||
+#6'Height'#2#16#3'Top'#3#128#0#5'Width'#2' '#7'Caption'#6#5'Glyph'#11'Parent'
|
||||
+'Color'#8#0#0#6'TLabel'#6'Label9'#4'Left'#3#205#1#6'Height'#2#16#3'Top'#3#176
|
||||
+#0#5'Width'#2'c'#7'Caption'#6#16'Glyph Background'#11'ParentColor'#8#0#0#6'T'
|
||||
+'Label'#7'Label10'#4'Left'#3#216#1#6'Height'#2#16#3'Top'#2#16#5'Width'#2';'#7
|
||||
+'Caption'#6#11'Click Color'#11'ParentColor'#8#0#0#6'TLabel'#7'Label11'#4'Lef'
|
||||
+'t'#3#208#1#6'Height'#2#16#3'Top'#2'H'#5'Width'#2'N'#7'Caption'#6#14'Disable'
|
||||
+'d Color'#11'ParentColor'#8#0#0#6'TLabel'#7'Label12'#4'Left'#3'p'#1#6'Height'
|
||||
+#2#16#3'Top'#2#16#5'Width'#2'7'#7'Caption'#6#10'Text Color'#11'ParentColor'#8
|
||||
+#0#0#9'TTrackBar'#9'TrackBar1'#4'Left'#2#8#6'Height'#2#30#3'Top'#2'`'#5'Widt'
|
||||
+'h'#3#184#1#3'Max'#4#160#134#1#0#8'OnChange'#7#15'TrackBar1Change'#8'Positio'
|
||||
+'n'#2#0#8'ScalePos'#7#8'trBottom'#9'TickStyle'#7#6'tsNone'#5'Align'#7#8'alCu'
|
||||
+'stom'#8'TabOrder'#2#0#0#0#9'TTrackBar'#9'TrackBar2'#4'Left'#2#8#6'Height'#2
|
||||
+#30#3'Top'#3#152#0#5'Width'#3#184#1#3'Max'#4#160#134#1#0#8'OnChange'#7#15'Tr'
|
||||
+'ackBar2Change'#8'Position'#2#0#8'ScalePos'#7#8'trBottom'#7'TabStop'#8#9'Tic'
|
||||
+'kStyle'#7#6'tsNone'#5'Align'#7#8'alCustom'#8'TabOrder'#2#1#0#0#11'TCheckGro'
|
||||
+'up'#11'CheckGroup1'#4'Left'#2#8#6'Height'#2'i'#3'Top'#3'@'#1#5'Width'#3#129
|
||||
+#0#8'AutoFill'#9#7'Caption'#6#12'Border Sides'#28'ChildSizing.LeftRightSpaci'
|
||||
+'ng'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizont'
|
||||
+'al'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crs'
|
||||
+'HomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'
|
||||
+#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7
|
||||
+#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#13'It'
|
||||
+'ems.Strings'#1#6#12'bsBottomLine'#6#9'bsTopLine'#6#10'bsLeftLine'#6#11'bsRi'
|
||||
+'ghtLine'#0#11'OnItemClick'#7#20'CheckGroup1ItemClick'#8'TabOrder'#2#4#4'Dat'
|
||||
+'a'#10#8#0#0#0#4#0#0#0#2#2#2#2#0#0#11'TCheckGroup'#11'CheckGroup2'#4'Left'#2
|
||||
+#8#6'Height'#2'Y'#3'Top'#3#216#0#5'Width'#3#129#0#8'AutoFill'#9#7'Caption'#6
|
||||
+#5'Other'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpaci'
|
||||
+'ng'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27
|
||||
+'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.'
|
||||
+'ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14
|
||||
+'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'
|
||||
+#27'ChildSizing.ControlsPerLine'#2#1#13'Items.Strings'#1#6#15'ShowFocusBorde'
|
||||
+'r'#6#9'ShowGlyph'#6#7'Enabled'#0#11'OnItemClick'#7#20'CheckGroup2ItemClick'
|
||||
+#8'TabOrder'#2#6#4'Data'#10#7#0#0#0#3#0#0#0#2#2#2#0#0#11'TRadioGroup'#11'Rad'
|
||||
+'ioGroup1'#4'Left'#3#176#1#6'Height'#2'A'#3'Top'#3#240#0#5'Width'#3#129#0#8
|
||||
+'AutoFill'#9#7'Caption'#6#13'Gradient Type'#28'ChildSizing.LeftRightSpacing'
|
||||
+#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7
|
||||
+#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomoge'
|
||||
+'nousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'C'
|
||||
+'hildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29
|
||||
+'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'Clien'
|
||||
+'tHeight'#2'/'#11'ClientWidth'#2'}'#9'ItemIndex'#2#0#13'Items.Strings'#1#6#12
|
||||
+'gtHorizontal'#6#10'gtVertical'#0#7'OnClick'#7#16'RadioGroup1Click'#8'TabOrd'
|
||||
+'er'#2#8#0#0#11'TRadioGroup'#11'RadioGroup2'#4'Left'#3#151#0#6'Height'#2'i'#3
|
||||
+'Top'#3'@'#1#5'Width'#3#129#0#8'AutoFill'#9#7'Caption'#6#17'Rotated Directio'
|
||||
+'n'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6
|
||||
+#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSi'
|
||||
+'zing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkH'
|
||||
,'orizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScal'
|
||||
+'eChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'Chil'
|
||||
+'dSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'W'#11'ClientWidth'#2'}'#9'I'
|
||||
+'temIndex'#2#0#13'Items.Strings'#1#6#8'rdNormal'#6#6'rdLeft'#6#7'rdRight'#0#7
|
||||
+'OnClick'#7#16'RadioGroup2Click'#8'TabOrder'#2#2#0#0#11'TRadioGroup'#11'Radi'
|
||||
+'oGroup3'#4'Left'#3'('#1#6'Height'#2'i'#3'Top'#3'@'#1#5'Width'#2'y'#8'AutoFi'
|
||||
+'ll'#9#7'Caption'#6#13'Button Layout'#28'ChildSizing.LeftRightSpacing'#2#6#28
|
||||
+'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'cr'
|
||||
+'sHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousC'
|
||||
+'hildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildS'
|
||||
+'izing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclL'
|
||||
+'eftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHei'
|
||||
+'ght'#2'W'#11'ClientWidth'#2'u'#9'ItemIndex'#2#1#13'Items.Strings'#1#6#12'bl'
|
||||
+'GlyphRight'#6#11'blGlyphLeft'#6#10'blGlyphTop'#6#13'blGlyphBottom'#0#7'OnCl'
|
||||
+'ick'#7#16'RadioGroup3Click'#8'TabOrder'#2#3#0#0#11'TRadioGroup'#11'RadioGro'
|
||||
+'up4'#4'Left'#3#176#1#6'Height'#2'j'#3'Top'#3'@'#1#5'Width'#3#129#0#8'AutoFi'
|
||||
+'ll'#9#7'Caption'#6#14'Text Alignment'#28'ChildSizing.LeftRightSpacing'#2#6
|
||||
+#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24
|
||||
+'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenou'
|
||||
+'sChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'Chil'
|
||||
+'dSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cc'
|
||||
+'lLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientH'
|
||||
+'eight'#2'X'#11'ClientWidth'#2'}'#9'ItemIndex'#2#0#13'Items.Strings'#1#6#8't'
|
||||
+'aCenter'#6#13'taLeftJustify'#6#14'taRightJustify'#0#7'OnClick'#7#16'RadioGr'
|
||||
+'oup4Click'#8'TabOrder'#2#5#0#0#12'TLabeledEdit'#12'LabeledEdit1'#4'Left'#3
|
||||
+'H'#1#6'Height'#2#25#3'Top'#3#216#0#5'Width'#2'P EditLabel.AnchorSideLeft.Co'
|
||||
+'ntrol'#7#12'LabeledEdit1"EditLabel.AnchorSideBottom.Control'#7#12'LabeledEd'
|
||||
+'it1'#14'EditLabel.Left'#3'H'#1#16'EditLabel.Height'#2#16#13'EditLabel.Top'#3
|
||||
+#197#0#15'EditLabel.Width'#2'R'#17'EditLabel.Caption'#6#14'Button Caption'#21
|
||||
+'EditLabel.ParentColor'#8#8'TabOrder'#2#7#4'Text'#6#11'Sample Text'#7'OnKeyU'
|
||||
+'p'#7#17'LabeledEdit1KeyUp'#0#0#11'TGradButton'#1'b'#4'Left'#3#152#0#6'Heigh'
|
||||
+'t'#2'`'#3'Top'#3#200#0#5'Width'#3#168#0#7'Caption'#6#11'Sample Text'#10'Fon'
|
||||
+'t.Color'#7#7'clWhite'#11'Font.Height'#2#241#7'OnClick'#7#6'bClick'#8'TabOrd'
|
||||
+'er'#2#9#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'
|
||||
+#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlu'
|
||||
+'e'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Ba'
|
||||
+'ckgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'Glyph'
|
||||
+'BackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackground'
|
||||
+'Draw'#8#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0
|
||||
+#11'TGradButton'#15'BaseColorButton'#4'Left'#2#8#6'Height'#2#25#3'Top'#2'#'#5
|
||||
+'Width'#2'h'#7'Caption'#6#15'BaseColorButton'#10'Font.Color'#7#7'clWhite'#7
|
||||
+'OnClick'#7#14'BaseColorClick'#8'TabOrder'#2#10#7'TabStop'#9#11'NormalBlend'
|
||||
+#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'B'
|
||||
+'aseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'
|
||||
+#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'Show'
|
||||
+'FocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'Clic'
|
||||
+'kColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2
|
||||
+#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradButton'#22'NormalBlendColor'
|
||||
+'Button'#4'Left'#2'x'#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6
|
||||
+#22'NormalBlendColorButton'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#16'Norm'
|
||||
+'alBlendClick'#8'TabOrder'#2#11#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0
|
||||
+#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'cl'
|
||||
+'Blue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendCo'
|
||||
+'lor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9
|
||||
+#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clB'
|
||||
+'lue'#19'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2#15#23'AutoHeigh'
|
||||
+'tBorderSpacing'#2#15#0#0#11'TGradButton'#15'OverBlendButton'#4'Left'#3#232#0
|
||||
+#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#15'OverBlendButton'#10
|
||||
+'Font.Color'#7#7'clWhite'#7'OnClick'#7#14'OverBlendClick'#8'TabOrder'#2#12#7
|
||||
+'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186
|
||||
+'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'Norm'
|
||||
+'alBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundCo'
|
||||
+'lor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackground'
|
||||
+'Color'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22
|
||||
,'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradB'
|
||||
+'utton'#15'LoadGlyphButton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#144#0#5
|
||||
+'Width'#2'h'#7'Caption'#6#10'Load Glyph'#10'Font.Color'#7#7'clWhite'#7'OnCli'
|
||||
+'ck'#7#20'LoadGlyphButtonClick'#8'TabOrder'#2#13#7'TabStop'#9#11'NormalBlend'
|
||||
+#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'B'
|
||||
+'aseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'
|
||||
+#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'Show'
|
||||
+'FocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'Clic'
|
||||
+'kColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2
|
||||
+#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradButton'#26'GlyphBackgroundC'
|
||||
+'olorButton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#192#0#5'Width'#2'h'#7'C'
|
||||
+'aption'#6#26'GlyphBackgroundColorButton'#10'Font.Color'#7#7'clWhite'#7'OnCl'
|
||||
+'ick'#7#31'GlyphBackgroundColorButtonClick'#8'TabOrder'#2#14#7'TabStop'#9#11
|
||||
+'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'
|
||||
+#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColo'
|
||||
+'r'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'cl'
|
||||
+'BtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7#7'clWhite'#10'Cli'
|
||||
+'ckColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpa'
|
||||
+'cing'#2#15#0#0#11'TGradButton'#15'BaseColorButton'#4'Left'#2#8#6'Height'#2
|
||||
+#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#15'BaseColorButton'#10'Font.Color'
|
||||
+#7#7'clWhite'#7'OnClick'#7#14'BaseColorClick'#8'TabOrder'#2#10#7'TabStop'#9
|
||||
+#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'
|
||||
+#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColo'
|
||||
+'r'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'cl'
|
||||
+'BtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7#7'clWhite'#10'Cli'
|
||||
+'ckColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpa'
|
||||
+'cing'#2#15#0#0#11'TGradButton'#22'NormalBlendColorButton'#4'Left'#2'x'#6'He'
|
||||
+'ight'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#22'NormalBlendColorButton'
|
||||
+#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#16'NormalBlendClick'#8'TabOrder'#2
|
||||
+#11#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5'
|
||||
+'^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'
|
||||
+#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Backg'
|
||||
+'roundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7
|
||||
+#7'clWhite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15#23'Au'
|
||||
+'toHeightBorderSpacing'#2#15#0#0#11'TGradButton'#15'OverBlendButton'#4'Left'
|
||||
+#3#232#0#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#15'OverBlendB'
|
||||
+'utton'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#14'OverBlendClick'#8'TabOrd'
|
||||
+'er'#2#12#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlen'
|
||||
+'d'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'cl'
|
||||
+'Blue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15
|
||||
+'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundCol'
|
||||
+'or'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15
|
||||
+#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradButton'#15'LoadGlyphButton'#4
|
||||
+'Left'#3#196#1#6'Height'#2#25#3'Top'#3#144#0#5'Width'#2'h'#7'Caption'#6#10'L'
|
||||
,'oad Glyph'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#20'LoadGlyphButtonClick'
|
||||
+#8'TabOrder'#2#13#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9
|
||||
+'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'
|
||||
+#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilv'
|
||||
+'er'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgr'
|
||||
+'oundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBorderSpacin'
|
||||
+'g'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradButton'#26'GlyphBackgr'
|
||||
+'oundColorButton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#192#0#5'Width'#2'h'
|
||||
+#7'Caption'#6#26'GlyphBackgroundColorButton'#10'Font.Color'#7#7'clWhite'#7'O'
|
||||
+'nClick'#7#31'GlyphBackgroundColorButtonClick'#8'TabOrder'#2#14#7'TabStop'#9
|
||||
+#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'
|
||||
+#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColo'
|
||||
+'r'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'cl'
|
||||
+'BtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7#7'clWhite'#10'Cli'
|
||||
+'ckColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpa'
|
||||
+'cing'#2#15#0#0#11'TGradButton'#16'ClickColorButton'#4'Left'#3#196#1#6'Heigh'
|
||||
+'t'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#16'ClickColorButton'#10'Font'
|
||||
+'.Color'#7#7'clWhite'#7'OnClick'#7#21'ClickColorButtonClick'#8'TabOrder'#2#15
|
||||
+#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'
|
||||
+#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16
|
||||
+'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Backgrou'
|
||||
+'ndColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7#7
|
||||
+'clWhite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15#23'Auto'
|
||||
+'BtnFace'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7
|
||||
+'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthB'
|
||||
+'orderSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradButton'#16
|
||||
+'ClickColorButton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7
|
||||
+'Caption'#6#16'ClickColorButton'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#21
|
||||
+'ClickColorButtonClick'#8'TabOrder'#2#15#7'TabStop'#9#11'NormalBlend'#5#0#0#0
|
||||
+#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'
|
||||
+#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverB'
|
||||
+'lendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBor'
|
||||
+'der'#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7
|
||||
+#6'clBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2#15#23'Auto'
|
||||
+'HeightBorderSpacing'#2#15#0#0#11'TGradButton'#19'DisabledColorButton'#4'Lef'
|
||||
+'t'#3#196#1#6'Height'#2#25#3'Top'#2']'#5'Width'#2'h'#7'Caption'#6#19'Disable'
|
||||
+'dColorButton'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#24'DisabledColorButt'
|
||||
+'onClick'#8'TabOrder'#2#16#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128
|
||||
+#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'
|
||||
+#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7
|
||||
+#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#20'Gly'
|
||||
+'phBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBord'
|
||||
+'erSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#9'TCheckBox'#17'Underl'
|
||||
+'ineCheckBox'#4'Left'#3'G'#1#6'Height'#2#19#3'Top'#3#242#0#5'Width'#2'G'#7'C'
|
||||
+'aption'#6#9'Underline'#8'OnChange'#7#23'UnderlineCheckBoxChange'#8'TabOrder'
|
||||
+#2#17#0#0#9'TCheckBox'#12'BoldCheckBox'#4'Left'#3'G'#1#6'Height'#2#19#3'Top'
|
||||
+#3#5#1#5'Width'#2'.'#7'Caption'#6#4'Bold'#8'OnChange'#7#18'BoldCheckBoxChang'
|
||||
+'e'#8'TabOrder'#2#18#0#0#11'TGradButton'#15'TextColorButton'#4'Left'#3'X'#1#6
|
||||
+'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#10'Text Color'#10'Font.'
|
||||
+'Color'#7#7'clWhite'#7'OnClick'#7#20'TextColorButtonClick'#8'TabOrder'#2#19#7
|
||||
+'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186
|
||||
+'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'Norm'
|
||||
+'alBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundCo'
|
||||
+'lor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7#7'clWh'
|
||||
+'ite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBorderSpacing'#2#15#23'AutoHeig'
|
||||
+'htBorderSpacing'#2#15#0#0#9'TCheckBox'#14'ItalicCheckBox'#4'Left'#3'G'#1#6
|
||||
+'Height'#2#19#3'Top'#3#24#1#5'Width'#2'1'#7'Caption'#6#6'Italic'#8'OnChange'
|
||||
+#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#9'Show'
|
||||
+'Glyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19
|
||||
+'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderS'
|
||||
+'pacing'#2#15#0#0#9'TCheckBox'#17'UnderlineCheckBox'#4'Left'#3'G'#1#6'Height'
|
||||
+#2#19#3'Top'#3#242#0#5'Width'#2'G'#7'Caption'#6#9'Underline'#8'OnChange'#7#23
|
||||
+'UnderlineCheckBoxChange'#8'TabOrder'#2#17#0#0#9'TCheckBox'#12'BoldCheckBox'
|
||||
+#4'Left'#3'G'#1#6'Height'#2#19#3'Top'#3#5#1#5'Width'#2','#7'Caption'#6#4'Bol'
|
||||
+'d'#8'OnChange'#7#18'BoldCheckBoxChange'#8'TabOrder'#2#18#0#0#11'TGradButton'
|
||||
+#15'TextColorButton'#4'Left'#3'X'#1#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'
|
||||
+#7'Caption'#6#10'Text Color'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#20'Tex'
|
||||
+'tColorButtonClick'#8'TabOrder'#2#19#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0
|
||||
+#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6
|
||||
+'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlend'
|
||||
+'Color'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'
|
||||
+#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'c'
|
||||
+'lBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2#15#23'AutoHei'
|
||||
+'ghtBorderSpacing'#2#15#0#0#9'TCheckBox'#14'ItalicCheckBox'#4'Left'#3'G'#1#6
|
||||
+'Height'#2#19#3'Top'#3#24#1#5'Width'#2'-'#7'Caption'#6#6'Italic'#8'OnChange'
|
||||
+#7#20'ItalicCheckBoxChange'#8'TabOrder'#2#20#0#0#9'TCheckBox'#24'GlyphTransp'
|
||||
+'arentCheckBox'#4'Left'#3#192#1#6'Height'#2#19#3'Top'#3#220#0#5'Width'#2's'#7
|
||||
+'arentCheckBox'#4'Left'#3#192#1#6'Height'#2#19#3'Top'#3#220#0#5'Width'#2'u'#7
|
||||
+'Caption'#6#17'Glyph Transparent'#8'OnChange'#7#30'GlyphTransparentCheckBoxC'
|
||||
+'hange'#8'TabOrder'#2#21#0#0#12'TColorDialog'#12'ColorDialog1'#5'Color'#4'1i'
|
||||
+#182#0#4'left'#2#8#3'top'#3#176#0#0#0#18'TOpenPictureDialog'#18'OpenPictureD'
|
||||
+'ialog1'#6'Filter'#6#255'Graphic (*.tga;*.jpg;*.ico;*.ppm;*.pgm;*.pbm;*.png;'
|
||||
+'*.xpm;*.bmp)|*.tga;*.jpg;*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|TGA Imag'
|
||||
+'e File (*.tga)|*.tga|Jpint Picture Expert Group (*.jpg)|*.jpg|Symbol (*.ico'
|
||||
+')|*.ico|Portable Pixmap (*.ppm)|*.ppm|Portable Graymap'#4'left'#2'0'#3'top'
|
||||
+#3#176#0#0#0#0
|
||||
+#182#0#20'CustomColors.Strings'#1#6#13'ColorA=000000'#6#13'ColorB=000080'#6
|
||||
+#13'ColorC=008000'#6#13'ColorD=008080'#6#13'ColorE=800000'#6#13'ColorF=80008'
|
||||
+'0'#6#13'ColorG=808000'#6#13'ColorH=808080'#6#13'ColorI=C0C0C0'#6#13'ColorJ='
|
||||
+'0000FF'#6#13'ColorK=00FF00'#6#13'ColorL=00FFFF'#6#13'ColorM=FF0000'#6#13'Co'
|
||||
+'lorN=FF00FF'#6#13'ColorO=FFFF00'#6#13'ColorP=FFFFFF'#6#13'ColorQ=C0DCC0'#6
|
||||
+#13'ColorR=F0CAA6'#6#13'ColorS=F0FBFF'#6#13'ColorT=A4A0A0'#0#4'left'#2#8#3't'
|
||||
+'op'#3#176#0#0#0#18'TOpenPictureDialog'#18'OpenPictureDialog1'#6'Filter'#6
|
||||
+#255'Graphic (*.tga;*.jpg;*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp)|*.tga;*'
|
||||
+'.jpg;*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|TGA Image File (*.tga)|*.tga'
|
||||
,'|Jpint Picture Expert Group (*.jpg)|*.jpg|Symbol (*.ico)|*.ico|Portable Pix'
|
||||
+'map (*.ppm)|*.ppm|Portable Graymap'#4'left'#2'0'#3'top'#3#176#0#0#0#0
|
||||
]);
|
||||
|
@ -50,6 +50,7 @@ type
|
||||
RadioGroup4: TRadioGroup;
|
||||
TrackBar1: TTrackBar;
|
||||
TrackBar2: TTrackBar;
|
||||
procedure bClick(Sender: TObject);
|
||||
procedure BoldCheckBoxChange(Sender: TObject);
|
||||
procedure CheckGroup1ItemClick(Sender: TObject; Index: integer);
|
||||
procedure CheckGroup2ItemClick(Sender: TObject; Index: integer);
|
||||
@ -288,6 +289,11 @@ begin
|
||||
b.Font.Style := b.Font.Style - [fsBold];
|
||||
end;
|
||||
|
||||
procedure TForm1.bClick(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckGroup1ItemClick(Sender: TObject; Index: integer);
|
||||
var
|
||||
bs : TBorderSides;
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ This file was automatically created by Lazarus. do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
{ Diese Datei wurde automatisch von Lazarus erzeugt. Sie darf nicht bearbeitet
|
||||
werden!
|
||||
Dieser Quelltext dient nur dem Übersetzen und Installieren des Packages.
|
||||
}
|
||||
|
||||
unit gradbutton;
|
||||
@ -7,7 +8,7 @@ unit gradbutton;
|
||||
interface
|
||||
|
||||
uses
|
||||
ugradbtn, uRotateBitmap, LazarusPackageIntf;
|
||||
ugradbtn, uRotateBitmap, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -36,6 +36,7 @@ type
|
||||
FAutoHeight: Boolean;
|
||||
FAutoHeightBorderSpacing: Integer;
|
||||
FAutoWidthBorderSpacing: Integer;
|
||||
FOnBorderBackgroundPaint: TGBBackgroundPaintEvent;
|
||||
FRotateDirection : TRotateDirection;
|
||||
FTextAlignment : TTextAlignment;
|
||||
FButtonLayout: TButtonLayout;
|
||||
@ -171,6 +172,7 @@ type
|
||||
property OnHotBackgroundPaint : TGBBackgroundPaintEvent read FOnHotBackgroundPaint write FOnHotBackgroundPaint;
|
||||
property OnDownBackgroundPaint : TGBBackgroundPaintEvent read FOnDownBackgroundPaint write FOnDownBackgroundPaint;
|
||||
property OnDisabledBackgroundPaint : TGBBackgroundPaintEvent read FOnDisabledBackgroundPaint write FOnDisabledBackgroundPaint;
|
||||
property OnBorderBackgroundPaint : TGBBackgroundPaintEvent read FOnBorderBackgroundPaint write FOnBorderBackgroundPaint;
|
||||
end;
|
||||
|
||||
function ColorBetween(C1, C2 : TColor; blend:Extended):TColor;
|
||||
@ -250,17 +252,17 @@ end;
|
||||
|
||||
procedure TGradButton.Resize;
|
||||
begin
|
||||
if (HasParent) then
|
||||
begin
|
||||
if FAutoWidth then
|
||||
UpdateButton
|
||||
else begin
|
||||
UpdatePositions;
|
||||
UpdateBackground;
|
||||
end;
|
||||
inherited;
|
||||
|
||||
if (HasParent) then
|
||||
begin
|
||||
if FAutoWidth then
|
||||
UpdateButton
|
||||
else begin
|
||||
UpdatePositions;
|
||||
UpdateBackground;
|
||||
end;
|
||||
|
||||
inherited;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGradButton.UpdatePositions;
|
||||
@ -385,160 +387,164 @@ end;
|
||||
|
||||
procedure TGradButton.PaintBackground(AState: TButtonState; TrgBitmap: TBitmap);
|
||||
var
|
||||
FTempState : TButtonState;
|
||||
FTempState : TButtonState;
|
||||
FOnTemp : TGBBackgroundPaintEvent;
|
||||
begin
|
||||
FTempState:=FState;
|
||||
FTempState:=FState;
|
||||
|
||||
GetBackgroundRect(FBackgroundRect);
|
||||
GetBackgroundRect(FBackgroundRect);
|
||||
|
||||
with TrgBitmap do
|
||||
begin
|
||||
Canvas.Font.Color := Self.Font.Color;
|
||||
Canvas.Font := Self.Font;
|
||||
Width := Self.Width;
|
||||
Height := Self.Height;
|
||||
with TrgBitmap do
|
||||
begin
|
||||
Canvas.Font.Color := Self.Font.Color;
|
||||
Canvas.Font := Self.Font;
|
||||
Width := Self.Width;
|
||||
Height := Self.Height;
|
||||
|
||||
Canvas.Brush.Color:=clWhite;
|
||||
Canvas.FillRect(0, 0, Width, Height);
|
||||
Canvas.Brush.Color:=clWhite;
|
||||
Canvas.FillRect(0, 0, Width, Height);
|
||||
|
||||
if Self.Parent is TGradButton then
|
||||
begin
|
||||
bm.Canvas.CopyRect(Rect(0, 0, Width, Height), (Self.Parent as TGradButton).GetBackground,
|
||||
Rect(Left,Top,Left+Width,Top+Height));
|
||||
end else begin
|
||||
Canvas.Brush.Color:=FBackgroundColor;
|
||||
if Self.Parent is TGradButton then
|
||||
begin
|
||||
bm.Canvas.CopyRect(Rect(0, 0, Width, Height), (Self.Parent as TGradButton).GetBackground,
|
||||
Rect(Left,Top,Left+Width,Top+Height));
|
||||
end else begin
|
||||
Canvas.Brush.Color:=FBackgroundColor;
|
||||
|
||||
Canvas.FillRect(0 , 0, Width, Height);
|
||||
end;
|
||||
Canvas.FillRect(0 , 0, Width, Height);
|
||||
end;
|
||||
|
||||
//Top
|
||||
if (bsTopLine in BorderSides) then
|
||||
begin
|
||||
if FOwnerBackgroundDraw AND (FOnBorderBackgroundPaint<>nil) then
|
||||
begin
|
||||
FOnBorderBackgroundPaint(Self, Canvas, FBackgroundRect, AState);
|
||||
end else begin
|
||||
//Top
|
||||
if (bsTopLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(FBackgroundRect.Left,0,FBackgroundRect.Right,0);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(FBackgroundRect.Left,1,FBackgroundRect.Right,1);
|
||||
end;
|
||||
end;
|
||||
|
||||
//Left
|
||||
if (bsLeftLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(0,FBackgroundRect.Top,0,FBackgroundRect.Bottom);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(1,FBackgroundRect.Top,1,FBackgroundRect.Bottom);
|
||||
end;
|
||||
//Left
|
||||
if (bsLeftLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(0,FBackgroundRect.Top,0,FBackgroundRect.Bottom);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(1,FBackgroundRect.Top,1,FBackgroundRect.Bottom);
|
||||
end;
|
||||
|
||||
//Right
|
||||
if (bsRightLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(Width-1,FBackgroundRect.Top,Width-1,FBackgroundRect.Bottom);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(Width-2,FBackgroundRect.Top,Width-2,FBackgroundRect.Bottom);
|
||||
end;
|
||||
//Right
|
||||
if (bsRightLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(Width-1,FBackgroundRect.Top,Width-1,FBackgroundRect.Bottom);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(Width-2,FBackgroundRect.Top,Width-2,FBackgroundRect.Bottom);
|
||||
end;
|
||||
|
||||
//Bottom
|
||||
if (bsBottomLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(FBackgroundRect.Left,Height-1,FBackgroundRect.Right,Height-1);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(FBackgroundRect.Left,Height-2,FBackgroundRect.Right,Height-2);
|
||||
end;
|
||||
//Bottom
|
||||
if (bsBottomLine in BorderSides) then
|
||||
begin
|
||||
Canvas.Pen.Color:=clBlack;
|
||||
Canvas.Line(FBackgroundRect.Left,Height-1,FBackgroundRect.Right,Height-1);
|
||||
Canvas.Pen.Color:=clWhite;
|
||||
Canvas.Line(FBackgroundRect.Left,Height-2,FBackgroundRect.Right,Height-2);
|
||||
end;
|
||||
|
||||
//Todo
|
||||
//TopLeft
|
||||
if (bsTopLine in BorderSides) AND (bsLeftLine in BorderSides) then
|
||||
Canvas.Pixels[1,1]:=clBlack;
|
||||
//TopLeft
|
||||
if (bsTopLine in BorderSides) AND (bsLeftLine in BorderSides) then
|
||||
Canvas.Pixels[1,1]:=clBlack;
|
||||
|
||||
//TopRight
|
||||
if (bsTopLine in BorderSides) AND (bsRightLine in BorderSides) then
|
||||
Canvas.Pixels[Width-2,1] := clBlack;
|
||||
//TopRight
|
||||
if (bsTopLine in BorderSides) AND (bsRightLine in BorderSides) then
|
||||
Canvas.Pixels[Width-2,1] := clBlack;
|
||||
|
||||
//BottomLeft
|
||||
if (bsBottomLine in BorderSides) AND (bsLeftLine in BorderSides) then
|
||||
Canvas.Pixels[1, Height-2]:=clBlack;
|
||||
//BottomLeft
|
||||
if (bsBottomLine in BorderSides) AND (bsLeftLine in BorderSides) then
|
||||
Canvas.Pixels[1, Height-2]:=clBlack;
|
||||
|
||||
//BottomRight
|
||||
if (bsBottomLine in BorderSides) AND (bsRightLine in BorderSides) then
|
||||
Canvas.Pixels[Width-2,Height-2]:=clBlack;
|
||||
//BottomRight
|
||||
if (bsBottomLine in BorderSides) AND (bsRightLine in BorderSides) then
|
||||
Canvas.Pixels[Width-2,Height-2]:=clBlack;
|
||||
end;
|
||||
|
||||
FState:=AState;
|
||||
FState:=AState;
|
||||
|
||||
PaintGradient(Canvas, FBackgroundRect);
|
||||
if FOwnerBackgroundDraw then
|
||||
begin
|
||||
if not FEnabled then
|
||||
FState := bsDisabled;
|
||||
|
||||
end;
|
||||
case FState of
|
||||
bsUp: FOnTemp := FOnNormalBackgroundPaint;
|
||||
bsHot:FOnTemp := FOnHotBackgroundPaint;
|
||||
bsDown: FOnTemp := FOnDownBackgroundPaint;
|
||||
bsDisabled: FOnTemp := FOnDisabledBackgroundPaint;
|
||||
end;
|
||||
|
||||
FState:=FTempState;
|
||||
if FOnTemp <> nil then
|
||||
begin
|
||||
FOnTemp(Self, Canvas, FBackgroundRect, FState);
|
||||
end;
|
||||
end else begin
|
||||
PaintGradient(Canvas, FBackgroundRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
FState:=FTempState;
|
||||
end;
|
||||
|
||||
procedure TGradButton.UpdateBackground;
|
||||
var
|
||||
FTempState : TButtonState;
|
||||
R : TRect;
|
||||
FTempState : TButtonState;
|
||||
begin
|
||||
FTempState:= FState;
|
||||
FTempState:= FState;
|
||||
|
||||
GetBackgroundRect(R);
|
||||
FEnabled:=true;
|
||||
PaintBackground(bsUp,FNormalBackgroundCache);
|
||||
PaintBackground(bsHot, FHotBackgroundCache);
|
||||
PaintBackground(bsDown, FDownBackgroundCache);
|
||||
FEnabled:=false;
|
||||
PaintBackground(bsUp, FDisabledBackgroundCache);
|
||||
FEnabled:=Enabled;
|
||||
|
||||
if FOwnerBackgroundDraw then
|
||||
begin
|
||||
if FOnNormalBackgroundPaint<>nil then
|
||||
FOnNormalBackgroundPaint(Self, FNormalBackgroundCache.Canvas, R, bsUp);
|
||||
FState:=FTempState;
|
||||
|
||||
if FOnHotBackgroundPaint<>nil then
|
||||
FOnHotBackgroundPaint(Self, FHotBackgroundCache.Canvas, R, bsHot);
|
||||
|
||||
if FOnDownBackgroundPaint<>nil then
|
||||
FOnDownBackgroundPaint(Self, FDownBackgroundCache.Canvas, R, bsDown);
|
||||
|
||||
if FOnDisabledBackgroundPaint<>nil then
|
||||
FOnDisabledBackgroundPaint(Self, FDisabledBackgroundCache.Canvas, R, bsDisabled);
|
||||
end else begin
|
||||
|
||||
FEnabled:=true;
|
||||
PaintBackground(bsUp,FNormalBackgroundCache);
|
||||
PaintBackground(bsHot, FHotBackgroundCache);
|
||||
PaintBackground(bsDown, FDownBackgroundCache);
|
||||
FEnabled:=false;
|
||||
PaintBackground(bsUp, FDisabledBackgroundCache);
|
||||
FEnabled:=Enabled;
|
||||
|
||||
end;
|
||||
|
||||
FState:=FTempState;
|
||||
InvPaint;
|
||||
end;
|
||||
|
||||
procedure TGradButton.GetBackgroundRect(var TheRect: TRect);
|
||||
begin
|
||||
TheRect := Rect(0,0,Width,Height);
|
||||
TheRect := Rect(0,0,Width,Height);
|
||||
|
||||
//Top
|
||||
if (bsTopLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Top := 2;
|
||||
end else
|
||||
TheRect.Top := 0;
|
||||
//Top
|
||||
if (bsTopLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Top := 2;
|
||||
end else
|
||||
TheRect.Top := 0;
|
||||
|
||||
//Left
|
||||
if (bsLeftLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Left := 2;
|
||||
end else
|
||||
TheRect.Left := 0;
|
||||
//Left
|
||||
if (bsLeftLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Left := 2;
|
||||
end else
|
||||
TheRect.Left := 0;
|
||||
|
||||
//Right
|
||||
if (bsRightLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Right := TheRect.Right-{$IFDEF windows}2{$ELSE}3{$ENDIF};
|
||||
end;
|
||||
//Right
|
||||
if (bsRightLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Right := TheRect.Right-{$IFDEF windows}2{$ELSE}3{$ENDIF};
|
||||
end;
|
||||
|
||||
//Bottom
|
||||
if (bsBottomLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Bottom := TheRect.Bottom - 2;
|
||||
end;
|
||||
//Bottom
|
||||
if (bsBottomLine in BorderSides) then
|
||||
begin
|
||||
TheRect.Bottom := TheRect.Bottom - 2;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TGradButton.GetContentRect(var TheRect: TRect);
|
||||
@ -707,59 +713,58 @@ begin
|
||||
Result := FBackground.Canvas;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
procedure TGradButton.PaintGradient(TrgCanvas: TCanvas; pr : TRect);
|
||||
var
|
||||
r : Integer;
|
||||
t1,t2,t3 : TColor;
|
||||
r : Integer;
|
||||
t1,t2,t3 : TColor;
|
||||
begin
|
||||
|
||||
case FState of
|
||||
bsHot,bsDown : begin
|
||||
t3 := FOverBlendColor;
|
||||
end;
|
||||
else begin
|
||||
t3 := FNormalBlendColor;
|
||||
end;
|
||||
case FState of
|
||||
bsHot,bsDown : begin
|
||||
t3 := FOverBlendColor;
|
||||
end;
|
||||
else begin
|
||||
t3 := FNormalBlendColor;
|
||||
end;
|
||||
end;
|
||||
|
||||
if FState = bsDown then begin
|
||||
t1 := FClickColor;
|
||||
end else if FEnabled then begin
|
||||
t1 := FBaseColor;
|
||||
end else begin
|
||||
t1 := FDisabledColor;
|
||||
t3 := FNormalBlendColor;
|
||||
end;
|
||||
if FState = bsDown then begin
|
||||
t1 := FClickColor;
|
||||
end else if FEnabled then begin
|
||||
t1 := FBaseColor;
|
||||
end else begin
|
||||
t1 := FDisabledColor;
|
||||
t3 := FNormalBlendColor;
|
||||
end;
|
||||
|
||||
t2 := ColorBetween(t1, t3, FNormalBlend);
|
||||
t2 := ColorBetween(t1, t3, FNormalBlend);
|
||||
|
||||
|
||||
if GradientType = gtHorizontal then
|
||||
begin
|
||||
if FState = bsDown then
|
||||
begin
|
||||
if GradientType = gtHorizontal then
|
||||
begin
|
||||
if FState = bsDown then
|
||||
begin
|
||||
for r := (pr.Bottom)-1 downto pr.Top do
|
||||
begin
|
||||
if (r > (pr.Bottom/2)) then
|
||||
begin
|
||||
TrgCanvas.Pen.Color:= ColorBetween(t1,t2,FOverBlend);
|
||||
end else begin
|
||||
TrgCanvas.Pen.Color := ColorsBetween([t1,t2], 1.0-(r / pr.Bottom));
|
||||
end;
|
||||
TrgCanvas.Line(pr.Left,r,pr.Right,r);
|
||||
end;
|
||||
end else
|
||||
for r := (pr.Bottom)-1 downto pr.Top do
|
||||
begin
|
||||
if (r > (pr.Bottom/2)) then
|
||||
begin
|
||||
|
||||
TrgCanvas.Pen.Color:= ColorBetween(t1,t2,FOverBlend);
|
||||
end else begin
|
||||
TrgCanvas.Pen.Color := ColorsBetween([t1,t2], 1.0-(r / pr.Bottom));
|
||||
end;
|
||||
TrgCanvas.Line(pr.Left,r,pr.Right,r);
|
||||
end;
|
||||
end else
|
||||
for r := (pr.Bottom)-1 downto pr.Top do
|
||||
begin
|
||||
if (r <= (pr.Bottom/2)) then
|
||||
begin
|
||||
//WriteLn('R: ', r, ' M: ', Trunc(pr.Bottom/2));
|
||||
TrgCanvas.Pen.Color:= ColorBetween(t1,t2,FOverBlend);
|
||||
end else begin
|
||||
TrgCanvas.Pen.Color := ColorsBetween([t1,t2], r / pr.Bottom);
|
||||
end;
|
||||
TrgCanvas.Line(pr.Left,r,pr.Right,r);
|
||||
if (r <= (pr.Bottom/2)) then
|
||||
begin
|
||||
//WriteLn('R: ', r, ' M: ', Trunc(pr.Bottom/2));
|
||||
TrgCanvas.Pen.Color:= ColorBetween(t1,t2,FOverBlend);
|
||||
end else begin
|
||||
TrgCanvas.Pen.Color := ColorsBetween([t1,t2], r / pr.Bottom);
|
||||
end;
|
||||
TrgCanvas.Line(pr.Left,r,pr.Right,r);
|
||||
end;
|
||||
end else begin
|
||||
if FState = bsDown then
|
||||
@ -814,62 +819,63 @@ end;
|
||||
|
||||
constructor TGradButton.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
inherited;
|
||||
|
||||
Width:=80;
|
||||
Height:=25;
|
||||
Width:=80;
|
||||
Height:=25;
|
||||
|
||||
FAutoWidthBorderSpacing:=15;
|
||||
FAutoHeightBorderSpacing:=15;
|
||||
FNormalBlend:=0.5;
|
||||
FOverBlend:=0.653;
|
||||
FBaseColor:=clBlue;
|
||||
FNormalBlendColor:=clWhite;
|
||||
FOverBlendColor:=clSilver;
|
||||
FBackgroundColor:=clBtnFace;
|
||||
FClickColor:=clBlue;
|
||||
FDisabledColor:=clGray;
|
||||
FEnabled:=true;
|
||||
FAutoWidth:=false;
|
||||
FAutoHeight:=false;
|
||||
FAutoWidthBorderSpacing:=15;
|
||||
FAutoHeightBorderSpacing:=15;
|
||||
FNormalBlend:=0.5;
|
||||
FOverBlend:=0.653;
|
||||
FBaseColor:=clBlue;
|
||||
FNormalBlendColor:=clWhite;
|
||||
FOverBlendColor:=clSilver;
|
||||
FBackgroundColor:=clBtnFace;
|
||||
FClickColor:=clBlue;
|
||||
FDisabledColor:=clGray;
|
||||
FEnabled:=true;
|
||||
FAutoWidth:=false;
|
||||
FAutoHeight:=false;
|
||||
FOwnerBackgroundDraw := false;
|
||||
|
||||
FOnlyBackground:=false;
|
||||
FShowFocusBorder:=true;
|
||||
FRotateDirection:=rdNormal;
|
||||
FTextAlignment:=taCenter;
|
||||
FTextGlyphSpacing := 2;
|
||||
TabStop:=true;
|
||||
FOnlyBackground:=false;
|
||||
FShowFocusBorder:=true;
|
||||
FRotateDirection:=rdNormal;
|
||||
FTextAlignment:=taCenter;
|
||||
FTextGlyphSpacing := 2;
|
||||
TabStop:=true;
|
||||
|
||||
ControlStyle := ControlStyle + [csAcceptsControls];
|
||||
ControlStyle := ControlStyle + [csAcceptsControls];
|
||||
|
||||
DoubleBuffered:=true;
|
||||
DoubleBuffered:=true;
|
||||
|
||||
FBackground := TBitmap.Create;
|
||||
with FBackground do
|
||||
begin
|
||||
Width:=Self.Width;
|
||||
Height:=Self.Height;
|
||||
end;
|
||||
FBackground := TBitmap.Create;
|
||||
with FBackground do
|
||||
begin
|
||||
Width:=Self.Width;
|
||||
Height:=Self.Height;
|
||||
end;
|
||||
|
||||
|
||||
FRotatedGlyph := TRotatedGlyph.Create;
|
||||
FRotatedGlyph.OnChange := @GlyphChanged;
|
||||
FRotatedText := TRotatedText.Create;
|
||||
FButtonLayout:=blGlyphLeft;
|
||||
FGlyphBackgroundColor:=clWhite;
|
||||
FRotatedGlyph := TRotatedGlyph.Create;
|
||||
FRotatedGlyph.OnChange := @GlyphChanged;
|
||||
FRotatedText := TRotatedText.Create;
|
||||
FButtonLayout:=blGlyphLeft;
|
||||
FGlyphBackgroundColor:=clWhite;
|
||||
|
||||
FNormalBackgroundCache := TBitmap.Create;
|
||||
FHotBackgroundCache := TBitmap.Create;
|
||||
FDownBackgroundCache := TBitmap.Create;
|
||||
FDisabledBackgroundCache := TBitmap.Create;
|
||||
|
||||
FBorderSides:=[bsTopLine,bsBottomLine,bsLeftLine,bsRightLine];
|
||||
FNormalBackgroundCache := TBitmap.Create;
|
||||
FHotBackgroundCache := TBitmap.Create;
|
||||
FDownBackgroundCache := TBitmap.Create;
|
||||
FDisabledBackgroundCache := TBitmap.Create;
|
||||
|
||||
bm := TBitmap.Create;
|
||||
FBorderSides:=[bsTopLine,bsBottomLine,bsLeftLine,bsRightLine];
|
||||
|
||||
UpdateBackground;
|
||||
bm := TBitmap.Create;
|
||||
|
||||
UpdateBackground;
|
||||
|
||||
Font.Color:=clWhite;
|
||||
Font.Color:=clWhite;
|
||||
end;
|
||||
|
||||
destructor TGradButton.Destroy;
|
||||
@ -918,20 +924,20 @@ end;
|
||||
|
||||
procedure TGradButton.SetNormalBlend(const Value: Extended);
|
||||
begin
|
||||
FNormalBlend:=Value;
|
||||
FNormalBlend:=Value;
|
||||
|
||||
UpdateBackground;
|
||||
|
||||
InvPaint;
|
||||
UpdateBackground;
|
||||
|
||||
InvPaint;
|
||||
end;
|
||||
|
||||
procedure TGradButton.SetOverBlend(const Value: Extended);
|
||||
begin
|
||||
FOverBlend:=Value;
|
||||
FOverBlend:=Value;
|
||||
|
||||
UpdateBackground;
|
||||
|
||||
InvPaint;
|
||||
UpdateBackground;
|
||||
|
||||
InvPaint;
|
||||
end;
|
||||
|
||||
procedure TGradButton.SetBaseColor(const Value: TColor);
|
||||
@ -1089,7 +1095,6 @@ end;
|
||||
|
||||
procedure TGradButton.MouseEnter;
|
||||
begin
|
||||
//WriteLn('MouseEnter');
|
||||
inherited;
|
||||
|
||||
if FState<>bsDown then
|
||||
|
Loading…
Reference in New Issue
Block a user