You've already forked lazarus-ccr
some fixed issues by Luiz Americo Pereira Camara =)
first working TGradTabControl git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@581 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,14 +1,14 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 292
|
Left = 292
|
||||||
Height = 440
|
Height = 443
|
||||||
Top = 151
|
Top = 151
|
||||||
Width = 575
|
Width = 576
|
||||||
ActiveControl = TrackBar1
|
ActiveControl = TrackBar1
|
||||||
BorderIcons = [biSystemMenu, biMinimize]
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
Caption = 'TGradButton-Demo'
|
Caption = 'TGradButton-Demo'
|
||||||
ClientHeight = 440
|
ClientHeight = 443
|
||||||
ClientWidth = 575
|
ClientWidth = 576
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '0.9.25'
|
LCLVersion = '0.9.25'
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
@ -76,7 +76,7 @@ object Form1: TForm1
|
|||||||
object Label9: TLabel
|
object Label9: TLabel
|
||||||
Left = 461
|
Left = 461
|
||||||
Height = 14
|
Height = 14
|
||||||
Top = 184
|
Top = 176
|
||||||
Width = 87
|
Width = 87
|
||||||
Caption = 'Glyph Background'
|
Caption = 'Glyph Background'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -323,10 +323,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
180000000000040000006400000064000000000000000000000054B60600
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -348,10 +344,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
18000000000004000000640000006400000000000000000000008C5A2500
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -373,10 +365,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
180000000000040000006400000064000000000000000000000044B32700
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -398,20 +386,16 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
18000000000004000000640000006400000000000000000000003C842500
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
object GradButton4: TGradButton
|
object LoadGlyphButton: TGradButton
|
||||||
Left = 452
|
Left = 452
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 149
|
Top = 144
|
||||||
Width = 104
|
Width = 104
|
||||||
Caption = 'Load Glyph'
|
Caption = 'Load Glyph'
|
||||||
OnClick = GradButton4Click
|
OnClick = LoadGlyphButtonClick
|
||||||
TabOrder = 13
|
TabOrder = 13
|
||||||
TabStop = True
|
TabStop = True
|
||||||
NormalBlend = 0.5
|
NormalBlend = 0.5
|
||||||
@ -423,17 +407,13 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
18000000000004000000640000006400000000000000000000006C3A2500
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
object GlyphBackgroundColorButton: TGradButton
|
object GlyphBackgroundColorButton: TGradButton
|
||||||
Left = 452
|
Left = 452
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 200
|
Top = 192
|
||||||
Width = 104
|
Width = 104
|
||||||
Caption = 'GlyphBackgroundColorButton'
|
Caption = 'GlyphBackgroundColorButton'
|
||||||
OnClick = GlyphBackgroundColorButtonClick
|
OnClick = GlyphBackgroundColorButtonClick
|
||||||
@ -448,10 +428,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
1800000000000400000064000000640000000000000000000000D4D42700
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -473,10 +449,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
18000000000004000000640000006400000000000000000000003C602500
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -498,10 +470,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
1800000000000400000064000000640000000000000000000000BC5B2500
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -541,10 +509,6 @@ object Form1: TForm1
|
|||||||
BackgroundColor = clBtnFace
|
BackgroundColor = clBtnFace
|
||||||
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
ShowFocusBorder = True
|
ShowFocusBorder = True
|
||||||
Glyph.Data = {
|
|
||||||
3A000000424D3A00000000000000360000002800000001000000010000000100
|
|
||||||
1800000000000400000064000000640000000000000000000000F4F82700
|
|
||||||
}
|
|
||||||
GlyphBackgroundColor = clWhite
|
GlyphBackgroundColor = clWhite
|
||||||
ClickColor = clBlue
|
ClickColor = clBlue
|
||||||
end
|
end
|
||||||
@ -557,6 +521,15 @@ object Form1: TForm1
|
|||||||
OnChange = ItalicCheckBoxChange
|
OnChange = ItalicCheckBoxChange
|
||||||
TabOrder = 20
|
TabOrder = 20
|
||||||
end
|
end
|
||||||
|
object GlyphTransparentCheckBox: TCheckBox
|
||||||
|
Left = 448
|
||||||
|
Height = 19
|
||||||
|
Top = 220
|
||||||
|
Width = 115
|
||||||
|
Caption = 'Glyph Transparent'
|
||||||
|
OnChange = GlyphTransparentCheckBoxChange
|
||||||
|
TabOrder = 21
|
||||||
|
end
|
||||||
object ColorDialog1: TColorDialog
|
object ColorDialog1: TColorDialog
|
||||||
Color = 11954481
|
Color = 11954481
|
||||||
left = 8
|
left = 8
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TForm1','FORMDATA',[
|
LazarusResources.Add('TForm1','FORMDATA',[
|
||||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'$'#1#6'Height'#3#184#1#3'Top'#3#151#0#5'W'
|
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'$'#1#6'Height'#3#187#1#3'Top'#3#151#0#5'W'
|
||||||
+'idth'#3'?'#2#13'ActiveControl'#7#9'TrackBar1'#11'BorderIcons'#11#12'biSyste'
|
+'idth'#3'@'#2#13'ActiveControl'#7#9'TrackBar1'#11'BorderIcons'#11#12'biSyste'
|
||||||
+'mMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#16'TGrad'
|
+'mMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Caption'#6#16'TGrad'
|
||||||
+'Button-Demo'#12'ClientHeight'#3#184#1#11'ClientWidth'#3'?'#2#8'OnCreate'#7
|
+'Button-Demo'#12'ClientHeight'#3#187#1#11'ClientWidth'#3'@'#2#8'OnCreate'#7
|
||||||
+#10'FormCreate'#10'LCLVersion'#6#6'0.9.25'#0#6'TLabel'#6'Label1'#4'Left'#2#8
|
+#10'FormCreate'#10'LCLVersion'#6#6'0.9.25'#0#6'TLabel'#6'Label1'#4'Left'#2#8
|
||||||
+#6'Height'#2#14#3'Top'#2'K'#5'Width'#2'<'#7'Caption'#6#11'NormalBlend'#11'Pa'
|
+#6'Height'#2#14#3'Top'#2'K'#5'Width'#2'<'#7'Caption'#6#11'NormalBlend'#11'Pa'
|
||||||
+'rentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#14#3'Top'#3#131
|
+'rentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#8#6'Height'#2#14#3'Top'#3#131
|
||||||
@ -16,7 +18,7 @@ LazarusResources.Add('TForm1','FORMDATA',[
|
|||||||
+'7'#4'Left'#3#240#0#6'Height'#2#14#3'Top'#2#16#5'Width'#2'R'#7'Caption'#6#16
|
+'7'#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
|
+'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'Parent'
|
+#6'Height'#2#14#3'Top'#3#128#0#5'Width'#2#28#7'Caption'#6#5'Glyph'#11'Parent'
|
||||||
+'Color'#8#0#0#6'TLabel'#6'Label9'#4'Left'#3#205#1#6'Height'#2#14#3'Top'#3#184
|
+'Color'#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'ParentColor'#8#0#0#6'T'
|
+#0#5'Width'#2'W'#7'Caption'#6#16'Glyph Background'#11'ParentColor'#8#0#0#6'T'
|
||||||
+'Label'#7'Label10'#4'Left'#3#216#1#6'Height'#2#14#3'Top'#2#16#5'Width'#2'2'#7
|
+'Label'#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'Lef'
|
+'Caption'#6#11'Click Color'#11'ParentColor'#8#0#0#6'TLabel'#7'Label11'#4'Lef'
|
||||||
@ -96,105 +98,89 @@ LazarusResources.Add('TForm1','FORMDATA',[
|
|||||||
+'it1KeyUp'#0#0#11'TGradButton'#1'b'#4'Left'#3#152#0#6'Height'#2'`'#3'Top'#3
|
+'it1KeyUp'#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'#11'Font.Height'#2#241#8
|
+#200#0#5'Width'#3#168#0#7'Caption'#6#11'Sample Text'#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'Ove'
|
+'TabOrder'#2#9#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'Ove'
|
||||||
+'rBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7
|
+'rBlend'#5#0'`'#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'
|
+#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'
|
||||||
+#15'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBot'
|
+#15'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBot'
|
||||||
+'tomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#10'Glyph.Da'
|
+'tomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBac'
|
||||||
+'ta'#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0#0#1#0#0
|
+'kgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'#15
|
||||||
+#0#1#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0'T'#182#6#0#20
|
+'BaseColorButton'#4'Left'#2#8#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Cap'
|
||||||
+'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradB'
|
+'tion'#6#15'BaseColorButton'#7'OnClick'#7#14'BaseColorClick'#8'TabOrder'#2#10
|
||||||
+'utton'#15'BaseColorButton'#4'Left'#2#8#6'Height'#2#25#3'Top'#2'#'#5'Width'#2
|
+#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5#0'`'
|
||||||
+'h'#7'Caption'#6#15'BaseColorButton'#7'OnClick'#7#14'BaseColorClick'#8'TabOr'
|
|
||||||
+'der'#2#10#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBle'
|
|
||||||
+'nd'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'c'
|
|
||||||
+'lBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15
|
|
||||||
+'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBottom'
|
|
||||||
+'Line'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#10'Glyph.Data'
|
|
||||||
+#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0#0#1#0#0#0#1
|
|
||||||
+#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#140'Z%'#0#20'Glyph'
|
|
||||||
+'BackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'
|
|
||||||
+#22'NormalBlendColorButton'#4'Left'#2'x'#6'Height'#2#25#3'Top'#2'#'#5'Width'
|
|
||||||
+#2'h'#7'Caption'#6#22'NormalBlendColorButton'#7'OnClick'#7#16'NormalBlendCli'
|
|
||||||
+'ck'#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'Col'
|
|
||||||
+'or'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'cl'
|
|
||||||
+'Silver'#15'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'
|
|
||||||
+#12'bsBottomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#10
|
|
||||||
+'Glyph.Data'#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0
|
|
||||||
+#0#1#0#0#0#1#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0'D'#179
|
|
||||||
+''''#0#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#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'#7'OnClick'#7#14'OverBlend'
|
|
||||||
+'Click'#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'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8
|
|
||||||
+'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'
|
|
||||||
+#12'bsBottomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#10
|
|
||||||
+'Glyph.Data'#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0
|
|
||||||
+#0#1#0#0#0#1#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0'<'#132
|
|
||||||
+'%'#0#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11
|
|
||||||
+'TGradButton'#11'GradButton4'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#149#0#5
|
|
||||||
+'Width'#2'h'#7'Caption'#6#10'Load Glyph'#7'OnClick'#7#16'GradButton4Click'#8
|
|
||||||
+'TabOrder'#2#13#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'Ov'
|
|
||||||
+'erBlend'#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'#11'BorderSides'#11#9'bsTopLine'#12'bsBot'
|
|
||||||
+'tomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#10'Glyph.Da'
|
|
||||||
+'ta'#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0#0#1#0#0
|
|
||||||
+#0#1#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0'l:%'#0#20'Glyp'
|
|
||||||
+'hBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButto'
|
|
||||||
+'n'#26'GlyphBackgroundColorButton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3
|
|
||||||
+#200#0#5'Width'#2'h'#7'Caption'#6#26'GlyphBackgroundColorButton'#7'OnClick'#7
|
|
||||||
+#31'GlyphBackgroundColorButtonClick'#8'TabOrder'#2#14#7'TabStop'#9#11'Normal'
|
|
||||||
+'Blend'#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'c'
|
|
||||||
+'lWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'
|
|
||||||
+#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'#10'bsLeftLine'#11'bsRightL'
|
|
||||||
+'ine'#0#15'ShowFocusBorder'#9#10'Glyph.Data'#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0
|
|
||||||
+#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0#0#1#0#0#0#1#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0
|
|
||||||
+'d'#0#0#0#0#0#0#0#0#0#0#0#212#212''''#0#20'GlyphBackgroundColor'#7#7'clWhite'
|
|
||||||
+#10'ClickColor'#7#6'clBlue'#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'ClickColor'
|
|
||||||
+'Button'#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'NormalBlendColo'
|
|
||||||
+'r'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'cl'
|
|
||||||
+'BtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'#10'bsLeftLine'#11
|
|
||||||
+'bsRightLine'#0#15'ShowFocusBorder'#9#10'Glyph.Data'#10'>'#0#0#0':'#0#0#0'BM'
|
|
||||||
+':'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0#0#1#0#0#0#1#0#24#0#0#0#0#0#4#0#0#0
|
|
||||||
+'d'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0'<`%'#0#20'GlyphBackgroundColor'#7#7'clWhi'
|
|
||||||
+'te'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'#19'DisabledColorButton'#4
|
|
||||||
+'Left'#3#196#1#6'Height'#2#25#3'Top'#2']'#5'Width'#2'h'#7'Caption'#6#19'Disa'
|
|
||||||
+'bledColorButton'#7'OnClick'#7#24'DisabledColorButtonClick'#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
|
+#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'
|
+'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Backgrou'
|
||||||
+'ndColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'#10
|
+'ndColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'#10
|
||||||
+'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#10'Glyph.Data'#10'>'#0#0
|
+'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'
|
||||||
+#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#1#0#0#0#1#0#0#0#1#0#24#0#0#0
|
+#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'#22'NormalBlendC'
|
||||||
+#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#188'[%'#0#20'GlyphBackgroundC'
|
+'olorButton'#4'Left'#2'x'#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'
|
||||||
+'olor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#9'TCheckBox'#17'Underline'
|
+#6#22'NormalBlendColorButton'#7'OnClick'#7#16'NormalBlendClick'#8'TabOrder'#2
|
||||||
+'CheckBox'#4'Left'#3'G'#1#6'Height'#2#19#3'Top'#3#242#0#5'Width'#2'G'#7'Capt'
|
+#11#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5#0
|
||||||
+'ion'#6#9'Underline'#8'OnChange'#7#23'UnderlineCheckBoxChange'#8'TabOrder'#2
|
+'`'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'
|
||||||
+#17#0#0#9'TCheckBox'#12'BoldCheckBox'#4'Left'#3'G'#1#6'Height'#2#19#3'Top'#3
|
+#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Backg'
|
||||||
+#5#1#5'Width'#2'.'#7'Caption'#6#4'Bold'#8'OnChange'#7#18'BoldCheckBoxChange'
|
+'roundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'
|
||||||
+#8'TabOrder'#2#18#0#0#11'TGradButton'#15'TextColorButton'#4'Left'#3'X'#1#6'H'
|
+#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBackgroundCo'
|
||||||
+'eight'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Caption'#6#10'Text Color'#7'OnClick'
|
+'lor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'#15'OverBle'
|
||||||
+#7#20'TextColorButtonClick'#8'TabOrder'#2#19#7'TabStop'#9#11'NormalBlend'#5#0
|
+'ndButton'#4'Left'#3#232#0#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7'Captio'
|
||||||
+#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseC'
|
+'n'#6#15'OverBlendButton'#7'OnClick'#7#14'OverBlendClick'#8'TabOrder'#2#12#7
|
||||||
+'olor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14
|
+'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5#0'`'
|
||||||
|
+#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'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'#10
|
||||||
|
+'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'
|
||||||
|
+#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'#15'LoadGlyphBut'
|
||||||
|
+'ton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#144#0#5'Width'#2'h'#7'Caption'
|
||||||
|
+#6#10'Load Glyph'#7'OnClick'#7#20'LoadGlyphButtonClick'#8'TabOrder'#2#13#7'T'
|
||||||
|
,'abStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5#0'`'#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'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'#10'bsL'
|
||||||
|
+'eftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7
|
||||||
|
+#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#11'TGradButton'#26'GlyphBackgroun'
|
||||||
|
+'dColorButton'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#192#0#5'Width'#2'h'#7
|
||||||
|
+'Caption'#6#26'GlyphBackgroundColorButton'#7'OnClick'#7#31'GlyphBackgroundCo'
|
||||||
|
+'lorButtonClick'#8'TabOrder'#2#14#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0
|
||||||
|
+#0#128#254'?'#9'OverBlend'#5#0'`'#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'#11'BorderSides'#11#9
|
||||||
|
+'bsTopLine'#12'bsBottomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBo'
|
||||||
|
+'rder'#9#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#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'#7'OnClick'#7#21'ClickCol'
|
||||||
|
+'orButtonClick'#8'TabOrder'#2#15#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0
|
||||||
|
+#128#254'?'#9'OverBlend'#5#0'`'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'c'
|
||||||
|
+'lBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendC'
|
||||||
|
+'olor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9
|
||||||
|
+'bsTopLine'#12'bsBottomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBo'
|
||||||
|
+'rder'#9#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0
|
||||||
|
+#11'TGradButton'#19'DisabledColorButton'#4'Left'#3#196#1#6'Height'#2#25#3'To'
|
||||||
|
+'p'#2']'#5'Width'#2'h'#7'Caption'#6#19'DisabledColorButton'#7'OnClick'#7#24
|
||||||
|
+'DisabledColorButtonClick'#8'TabOrder'#2#16#7'TabStop'#9#11'NormalBlend'#5#0
|
||||||
|
+#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5#0'`'#186'I'#12#2'+'#167#254'?'#9'Base'
|
||||||
|
+'Color'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14
|
||||||
+'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#11'BorderS'
|
+'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#11'BorderS'
|
||||||
+'ides'#11#9'bsTopLine'#12'bsBottomLine'#10'bsLeftLine'#11'bsRightLine'#0#15
|
+'ides'#11#9'bsTopLine'#12'bsBottomLine'#10'bsLeftLine'#11'bsRightLine'#0#15
|
||||||
+'ShowFocusBorder'#9#10'Glyph.Data'#10'>'#0#0#0':'#0#0#0'BM:'#0#0#0#0#0#0#0'6'
|
+'ShowFocusBorder'#9#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6
|
||||||
+#0#0#0'('#0#0#0#1#0#0#0#1#0#0#0#1#0#24#0#0#0#0#0#4#0#0#0'd'#0#0#0'd'#0#0#0#0
|
+'clBlue'#0#0#9'TCheckBox'#17'UnderlineCheckBox'#4'Left'#3'G'#1#6'Height'#2#19
|
||||||
+#0#0#0#0#0#0#0#244#248''''#0#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickC'
|
+#3'Top'#3#242#0#5'Width'#2'G'#7'Caption'#6#9'Underline'#8'OnChange'#7#23'Und'
|
||||||
+'olor'#7#6'clBlue'#0#0#9'TCheckBox'#14'ItalicCheckBox'#4'Left'#3'G'#1#6'Heig'
|
+'erlineCheckBoxChange'#8'TabOrder'#2#17#0#0#9'TCheckBox'#12'BoldCheckBox'#4
|
||||||
+'ht'#2#19#3'Top'#3#24#1#5'Width'#2'1'#7'Caption'#6#6'Italic'#8'OnChange'#7#20
|
+'Left'#3'G'#1#6'Height'#2#19#3'Top'#3#5#1#5'Width'#2'.'#7'Caption'#6#4'Bold'
|
||||||
+'ItalicCheckBoxChange'#8'TabOrder'#2#20#0#0#12'TColorDialog'#12'ColorDialog1'
|
+#8'OnChange'#7#18'BoldCheckBoxChange'#8'TabOrder'#2#18#0#0#11'TGradButton'#15
|
||||||
,#5'Color'#4'1i'#182#0#4'left'#2#8#3'top'#3#176#0#0#0#18'TOpenPictureDialog'
|
+'TextColorButton'#4'Left'#3'X'#1#6'Height'#2#25#3'Top'#2'#'#5'Width'#2'h'#7
|
||||||
+#18'OpenPictureDialog1'#6'Filter'#6#255'Graphic (*.tga;*.jpg;*.ico;*.ppm;*.p'
|
+'Caption'#6#10'Text Color'#7'OnClick'#7#20'TextColorButtonClick'#8'TabOrder'
|
||||||
+'gm;*.pbm;*.png;*.xpm;*.bmp)|*.tga;*.jpg;*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm'
|
+#2#19#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5
|
||||||
+';*.bmp|TGA Image File (*.tga)|*.tga|Jpint Picture Expert Group (*.jpg)|*.jp'
|
+#0'`'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'
|
||||||
+'g|Symbol (*.ico)|*.ico|Portable Pixmap (*.ppm)|*.ppm|Portable Graymap'#4'le'
|
+#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Backg'
|
||||||
+'ft'#2'0'#3'top'#3#176#0#0#0#0
|
+'roundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBottomLine'
|
||||||
|
+#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBackgroundCo'
|
||||||
|
+'lor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#0#0#9'TCheckBox'#14'ItalicChec'
|
||||||
|
+'kBox'#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'#7#20'ItalicCheckBoxChange'#8'TabOrder'#2#20#0#0#9'TCh'
|
||||||
|
+'eckBox'#24'GlyphTransparentCheckBox'#4'Left'#3#192#1#6'Height'#2#19#3'Top'#3
|
||||||
|
+#220#0#5'Width'#2's'#7'Caption'#6#17'Glyph Transparent'#8'OnChange'#7#30'Gly'
|
||||||
|
+'phTransparentCheckBoxChange'#8'TabOrder'#2#21#0#0#12'TColorDialog'#12'Color'
|
||||||
|
+'Dialog1'#5'Color'#4'1i'#182#0#4'left'#2#8#3'top'#3#176#0#0#0#18'TOpenPictur'
|
||||||
|
+'eDialog'#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 Pixmap (*.ppm)|*.ppm|Portable Gray'
|
||||||
|
+'map'#4'left'#2'0'#3'top'#3#176#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -15,6 +15,7 @@ type
|
|||||||
|
|
||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
BoldCheckBox: TCheckBox;
|
BoldCheckBox: TCheckBox;
|
||||||
|
GlyphTransparentCheckBox: TCheckBox;
|
||||||
ItalicCheckBox: TCheckBox;
|
ItalicCheckBox: TCheckBox;
|
||||||
Label12: TLabel;
|
Label12: TLabel;
|
||||||
TextColorButton: TGradButton;
|
TextColorButton: TGradButton;
|
||||||
@ -26,7 +27,7 @@ type
|
|||||||
BaseColorButton: TGradButton;
|
BaseColorButton: TGradButton;
|
||||||
NormalBlendColorButton: TGradButton;
|
NormalBlendColorButton: TGradButton;
|
||||||
OverBlendButton: TGradButton;
|
OverBlendButton: TGradButton;
|
||||||
GradButton4: TGradButton;
|
LoadGlyphButton: TGradButton;
|
||||||
GlyphBackgroundColorButton: TGradButton;
|
GlyphBackgroundColorButton: TGradButton;
|
||||||
ClickColorButton: TGradButton;
|
ClickColorButton: TGradButton;
|
||||||
DisabledColorButton: TGradButton;
|
DisabledColorButton: TGradButton;
|
||||||
@ -53,7 +54,8 @@ type
|
|||||||
procedure CheckGroup1ItemClick(Sender: TObject; Index: integer);
|
procedure CheckGroup1ItemClick(Sender: TObject; Index: integer);
|
||||||
procedure CheckGroup2ItemClick(Sender: TObject; Index: integer);
|
procedure CheckGroup2ItemClick(Sender: TObject; Index: integer);
|
||||||
procedure BaseColorClick(Sender: TObject);
|
procedure BaseColorClick(Sender: TObject);
|
||||||
procedure GradButton4Click(Sender: TObject);
|
procedure GlyphTransparentCheckBoxChange(Sender: TObject);
|
||||||
|
procedure LoadGlyphButtonClick(Sender: TObject);
|
||||||
procedure GlyphBackgroundColorButtonClick(Sender: TObject);
|
procedure GlyphBackgroundColorButtonClick(Sender: TObject);
|
||||||
procedure ClickColorButtonClick(Sender: TObject);
|
procedure ClickColorButtonClick(Sender: TObject);
|
||||||
procedure DisabledColorButtonClick(Sender: TObject);
|
procedure DisabledColorButtonClick(Sender: TObject);
|
||||||
@ -178,7 +180,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.GradButton4Click(Sender: TObject);
|
procedure TForm1.GlyphTransparentCheckBoxChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
b.Glyph.Transparent := GlyphTransparentCheckBox.Checked;
|
||||||
|
LoadGlyphButton.Glyph.Transparent := GlyphTransparentCheckBox.Checked;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.LoadGlyphButtonClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
tempPicture : TPicture;
|
tempPicture : TPicture;
|
||||||
begin
|
begin
|
||||||
@ -187,12 +195,13 @@ begin
|
|||||||
tempPicture := TPicture.Create;
|
tempPicture := TPicture.Create;
|
||||||
try
|
try
|
||||||
tempPicture.LoadFromFile(OpenPictureDialog1.FileName);
|
tempPicture.LoadFromFile(OpenPictureDialog1.FileName);
|
||||||
|
tempPicture.Graphic.Transparent := GlyphTransparentCheckBox.Checked;
|
||||||
|
|
||||||
b.Glyph.Assign(tempPicture.Graphic);
|
b.Glyph.Assign(tempPicture.Graphic);
|
||||||
|
|
||||||
GradButton4.Glyph.Assign(tempPicture.Graphic);
|
LoadGlyphButton.Glyph.Assign(tempPicture.Graphic);
|
||||||
GradButton4.ShowGlyph := true;
|
LoadGlyphButton.ShowGlyph := true;
|
||||||
GradButton4.Caption := '';
|
LoadGlyphButton.Caption := '';
|
||||||
finally
|
finally
|
||||||
tempPicture.Free;
|
tempPicture.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -1,74 +1,69 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 264
|
Left = 165
|
||||||
Height = 506
|
Height = 506
|
||||||
Top = 155
|
Top = 182
|
||||||
Width = 898
|
Width = 898
|
||||||
Caption = 'Form1'
|
Caption = 'Form1'
|
||||||
ClientHeight = 506
|
ClientHeight = 506
|
||||||
ClientWidth = 898
|
ClientWidth = 898
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
LCLVersion = '0.9.25'
|
ParentFont = False
|
||||||
|
LCLVersion = '0.9.27'
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Height = 506
|
Height = 506
|
||||||
Width = 655
|
Width = 751
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
Caption = 'Panel1'
|
Caption = 'Panel1'
|
||||||
ClientHeight = 506
|
ClientHeight = 506
|
||||||
ClientWidth = 655
|
ClientWidth = 751
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnClick = BewegeBtn
|
||||||
object GradTabControl1: TGradTabControl
|
object GradTabControl1: TGradTabControl
|
||||||
Left = 40
|
Left = 1
|
||||||
Height = 312
|
Height = 504
|
||||||
Top = 32
|
Top = 1
|
||||||
Width = 136
|
Width = 749
|
||||||
|
Align = alClient
|
||||||
ControlStyle = [csAcceptsControls]
|
ControlStyle = [csAcceptsControls]
|
||||||
ActivePage = GradTabPage2
|
PageIndex = -1
|
||||||
PageIndex = 1
|
|
||||||
TabHeight = 30
|
TabHeight = 30
|
||||||
TabPosition = tpRight
|
|
||||||
object GradTabPage1: TGradTabPage
|
|
||||||
Left = 2
|
|
||||||
Height = 308
|
|
||||||
Top = 2
|
|
||||||
Width = 126
|
|
||||||
Caption = 'GradTabPage1'
|
|
||||||
end
|
|
||||||
object GradTabPage2: TGradTabPage
|
|
||||||
Left = 2
|
|
||||||
Height = 308
|
|
||||||
Top = 2
|
|
||||||
Width = 102
|
|
||||||
PageIndex = 1
|
|
||||||
Caption = 'GradTabPage2'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 660
|
Left = 756
|
||||||
Height = 506
|
Height = 506
|
||||||
Width = 238
|
Width = 142
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel2'
|
Caption = 'Panel2'
|
||||||
ClientHeight = 506
|
ClientHeight = 506
|
||||||
ClientWidth = 238
|
ClientWidth = 142
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnClick = Panel2Click
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 15
|
||||||
|
Height = 14
|
||||||
|
Top = 304
|
||||||
|
Width = 79
|
||||||
|
Caption = 'Move Increment'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
object ComboBox1: TComboBox
|
object ComboBox1: TComboBox
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 21
|
Height = 21
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 100
|
Width = 100
|
||||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
|
MaxLength = -1
|
||||||
OnChange = ComboBox1Change
|
OnChange = ComboBox1Change
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object RadioGroup1: TRadioGroup
|
object RadioGroup1: TRadioGroup
|
||||||
Left = 16
|
Left = 17
|
||||||
Height = 113
|
Height = 113
|
||||||
Top = 152
|
Top = 80
|
||||||
Width = 100
|
Width = 100
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
Caption = 'Tab Position'
|
Caption = 'Tab Position'
|
||||||
@ -98,38 +93,55 @@ object Form1: TForm1
|
|||||||
Top = 276
|
Top = 276
|
||||||
Width = 75
|
Width = 75
|
||||||
Caption = 'Long Tabs'
|
Caption = 'Long Tabs'
|
||||||
|
Enabled = False
|
||||||
OnClick = CheckBox1Click
|
OnClick = CheckBox1Click
|
||||||
TabOrder = 5
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object SpinEdit1: TSpinEdit
|
object SpinEdit1: TSpinEdit
|
||||||
Left = 95
|
Left = 95
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 276
|
Top = 276
|
||||||
Width = 34
|
Width = 34
|
||||||
|
Enabled = False
|
||||||
MaxValue = 50
|
MaxValue = 50
|
||||||
OnEditingDone = SpinEdit1EditingDone
|
OnEditingDone = SpinEdit1EditingDone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Value = 50
|
Value = 50
|
||||||
end
|
end
|
||||||
object Arrow1: TArrow
|
object GradButton1: TGradButton
|
||||||
Left = 31
|
Left = 16
|
||||||
Height = 10
|
Height = 25
|
||||||
Top = 456
|
Top = 48
|
||||||
Width = 10
|
Width = 104
|
||||||
|
Caption = 'New Page'
|
||||||
|
OnClick = BewegeBtn
|
||||||
|
TabOrder = 4
|
||||||
|
TabStop = True
|
||||||
|
NormalBlend = 0.5
|
||||||
|
OverBlend = 0.653
|
||||||
|
BaseColor = clBlue
|
||||||
|
Color = clBlue
|
||||||
|
NormalBlendColor = clWhite
|
||||||
|
OverBlendColor = clSilver
|
||||||
|
BackgroundColor = clBtnFace
|
||||||
|
BorderSides = [bsTopLine, bsBottomLine, bsLeftLine, bsRightLine]
|
||||||
|
ShowFocusBorder = True
|
||||||
|
GlyphBackgroundColor = clWhite
|
||||||
|
ClickColor = clBlue
|
||||||
|
AutoWidthBorderSpacing = 15
|
||||||
end
|
end
|
||||||
object ScrollBox1: TScrollBox
|
object SpinEdit2: TSpinEdit
|
||||||
Left = -28
|
Left = 15
|
||||||
Height = 150
|
Height = 23
|
||||||
Top = 336
|
Top = 320
|
||||||
Width = 150
|
Width = 79
|
||||||
HorzScrollBar.Page = 145
|
MinValue = -100
|
||||||
VertScrollBar.Page = 145
|
OnChange = SpinEdit2Change
|
||||||
AutoScroll = False
|
TabOrder = 5
|
||||||
TabOrder = 3
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 655
|
Left = 751
|
||||||
Height = 506
|
Height = 506
|
||||||
Width = 5
|
Width = 5
|
||||||
end
|
end
|
||||||
|
@ -1,46 +1,51 @@
|
|||||||
{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
|
{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
|
||||||
|
|
||||||
LazarusResources.Add('TForm1','FORMDATA',[
|
LazarusResources.Add('TForm1','FORMDATA',[
|
||||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#8#1#6'Height'#3#250#1#3'Top'#3#155#0#5'Wi'
|
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#165#0#6'Height'#3#250#1#3'Top'#3#182#0#5
|
||||||
+'dth'#3#130#3#7'Caption'#6#5'Form1'#12'ClientHeight'#3#250#1#11'ClientWidth'
|
+'Width'#3#130#3#7'Caption'#6#5'Form1'#12'ClientHeight'#3#250#1#11'ClientWidt'
|
||||||
+#3#130#3#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#10'LCLV'
|
+'h'#3#130#3#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#10'P'
|
||||||
+'ersion'#6#6'0.9.25'#0#6'TPanel'#6'Panel1'#6'Height'#3#250#1#5'Width'#3#143#2
|
+'arentFont'#8#10'LCLVersion'#6#6'0.9.27'#0#6'TPanel'#6'Panel1'#6'Height'#3
|
||||||
+#5'Align'#7#6'alLeft'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
|
+#250#1#5'Width'#3#239#2#5'Align'#7#6'alLeft'#7'Anchors'#11#5'akTop'#6'akLeft'
|
||||||
+#0#7'Caption'#6#6'Panel1'#12'ClientHeight'#3#250#1#11'ClientWidth'#3#143#2#8
|
+#7'akRight'#8'akBottom'#0#7'Caption'#6#6'Panel1'#12'ClientHeight'#3#250#1#11
|
||||||
+'TabOrder'#2#0#0#15'TGradTabControl'#15'GradTabControl1'#4'Left'#2'('#6'Heig'
|
+'ClientWidth'#3#239#2#8'TabOrder'#2#0#7'OnClick'#7#9'BewegeBtn'#0#15'TGradTa'
|
||||||
+'ht'#3'8'#1#3'Top'#2' '#5'Width'#3#136#0#12'ControlStyle'#11#17'csAcceptsCon'
|
+'bControl'#15'GradTabControl1'#4'Left'#2#1#6'Height'#3#248#1#3'Top'#2#1#5'Wi'
|
||||||
+'trols'#0#10'ActivePage'#7#12'GradTabPage2'#9'PageIndex'#2#1#9'TabHeight'#2
|
+'dth'#3#237#2#5'Align'#7#8'alClient'#12'ControlStyle'#11#17'csAcceptsControl'
|
||||||
+#30#11'TabPosition'#7#7'tpRight'#0#12'TGradTabPage'#12'GradTabPage1'#4'Left'
|
+'s'#0#9'PageIndex'#2#255#9'TabHeight'#2#30#0#0#0#6'TPanel'#6'Panel2'#4'Left'
|
||||||
+#2#2#6'Height'#3'4'#1#3'Top'#2#2#5'Width'#2'~'#7'Caption'#6#12'GradTabPage1'
|
+#3#244#2#6'Height'#3#250#1#5'Width'#3#142#0#5'Align'#7#8'alClient'#7'Caption'
|
||||||
+#0#0#12'TGradTabPage'#12'GradTabPage2'#4'Left'#2#2#6'Height'#3'4'#1#3'Top'#2
|
+#6#6'Panel2'#12'ClientHeight'#3#250#1#11'ClientWidth'#3#142#0#8'TabOrder'#2#2
|
||||||
+#2#5'Width'#2'f'#9'PageIndex'#2#1#7'Caption'#6#12'GradTabPage2'#0#0#0#0#6'TP'
|
+#7'OnClick'#7#11'Panel2Click'#0#6'TLabel'#6'Label1'#4'Left'#2#15#6'Height'#2
|
||||||
+'anel'#6'Panel2'#4'Left'#3#148#2#6'Height'#3#250#1#5'Width'#3#238#0#5'Align'
|
+#14#3'Top'#3'0'#1#5'Width'#2'O'#7'Caption'#6#14'Move Increment'#11'ParentCol'
|
||||||
+#7#8'alClient'#7'Caption'#6#6'Panel2'#12'ClientHeight'#3#250#1#11'ClientWidt'
|
+'or'#8#0#0#9'TComboBox'#9'ComboBox1'#4'Left'#2#16#6'Height'#2#21#3'Top'#2#16
|
||||||
+'h'#3#238#0#8'TabOrder'#2#2#0#9'TComboBox'#9'ComboBox1'#4'Left'#2#16#6'Heigh'
|
+#5'Width'#2'd'#10'ItemHeight'#2#13#9'MaxLength'#2#255#8'OnChange'#7#15'Combo'
|
||||||
+'t'#2#21#3'Top'#2#16#5'Width'#2'd'#16'AutoCompleteText'#11#22'cbactEndOfLine'
|
+'Box1Change'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#11'TRadioGrou'
|
||||||
+'Complete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#13#8'OnChange'#7#15'C'
|
+'p'#11'RadioGroup1'#4'Left'#2#17#6'Height'#2'q'#3'Top'#2'P'#5'Width'#2'd'#8
|
||||||
+'omboBox1Change'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#11'TRadio'
|
+'AutoFill'#9#7'Caption'#6#12'Tab Position'#28'ChildSizing.LeftRightSpacing'#2
|
||||||
+'Group'#11'RadioGroup1'#4'Left'#2#16#6'Height'#2'q'#3'Top'#3#152#0#5'Width'#2
|
+#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7
|
||||||
+'d'#8'AutoFill'#9#7'Caption'#6#12'Tab Position'#28'ChildSizing.LeftRightSpac'
|
+#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomoge'
|
||||||
+'ing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizon'
|
+'nousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'C'
|
||||||
+'tal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'cr'
|
+'hildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29
|
||||||
+'sHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChild'
|
+'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'Clien'
|
||||||
+'s'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layou'
|
+'tHeight'#2'_'#11'ClientWidth'#2'`'#9'ItemIndex'#2#0#13'Items.Strings'#1#6#5
|
||||||
+'t'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1
|
+'tpTop'#6#8'tpBottom'#6#6'tpLeft'#6#7'tpRight'#0#7'OnClick'#7#16'RadioGroup1'
|
||||||
+#12'ClientHeight'#2'_'#11'ClientWidth'#2'`'#9'ItemIndex'#2#0#13'Items.String'
|
+'Click'#8'TabOrder'#2#2#0#0#9'TCheckBox'#9'CheckBox1'#4'Left'#2#15#6'Height'
|
||||||
+'s'#1#6#5'tpTop'#6#8'tpBottom'#6#6'tpLeft'#6#7'tpRight'#0#7'OnClick'#7#16'Ra'
|
+#2#19#3'Top'#3#20#1#5'Width'#2'K'#7'Caption'#6#9'Long Tabs'#7'Enabled'#8#7'O'
|
||||||
+'dioGroup1Click'#8'TabOrder'#2#2#0#0#9'TCheckBox'#9'CheckBox1'#4'Left'#2#15#6
|
+'nClick'#7#14'CheckBox1Click'#8'TabOrder'#2#3#0#0#9'TSpinEdit'#9'SpinEdit1'#4
|
||||||
+'Height'#2#19#3'Top'#3#20#1#5'Width'#2'K'#7'Caption'#6#9'Long Tabs'#7'OnClic'
|
+'Left'#2'_'#6'Height'#2#19#3'Top'#3#20#1#5'Width'#2'"'#7'Enabled'#8#8'MaxVal'
|
||||||
+'k'#7#14'CheckBox1Click'#8'TabOrder'#2#5#0#0#9'TSpinEdit'#9'SpinEdit1'#4'Lef'
|
+'ue'#2'2'#13'OnEditingDone'#7#20'SpinEdit1EditingDone'#8'TabOrder'#2#1#5'Val'
|
||||||
+'t'#2'_'#6'Height'#2#19#3'Top'#3#20#1#5'Width'#2'"'#8'MaxValue'#2'2'#13'OnEd'
|
+'ue'#2'2'#0#0#11'TGradButton'#11'GradButton1'#4'Left'#2#16#6'Height'#2#25#3
|
||||||
+'itingDone'#7#20'SpinEdit1EditingDone'#8'TabOrder'#2#1#5'Value'#2'2'#0#0#6'T'
|
+'Top'#2'0'#5'Width'#2'h'#7'Caption'#6#8'New Page'#7'OnClick'#7#9'BewegeBtn'#8
|
||||||
+'Arrow'#6'Arrow1'#4'Left'#2#31#6'Height'#2#10#3'Top'#3#200#1#5'Width'#2#10#0
|
+'TabOrder'#2#4#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'Ove'
|
||||||
+#0#10'TScrollBox'#10'ScrollBox1'#4'Left'#2#228#6'Height'#3#150#0#3'Top'#3'P'
|
+'rBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7
|
||||||
+#1#5'Width'#3#150#0#18'HorzScrollBar.Page'#3#145#0#18'VertScrollBar.Page'#3
|
+#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'
|
||||||
+#145#0#10'AutoScroll'#8#8'TabOrder'#2#3#0#0#0#9'TSplitter'#9'Splitter1'#4'Le'
|
+#15'BackgroundColor'#7#9'clBtnFace'#11'BorderSides'#11#9'bsTopLine'#12'bsBot'
|
||||||
+'ft'#3#143#2#6'Height'#3#250#1#5'Width'#2#5#0#0#10'TPopupMenu'#10'PopupMenu1'
|
+'tomLine'#10'bsLeftLine'#11'bsRightLine'#0#15'ShowFocusBorder'#9#20'GlyphBac'
|
||||||
+#4'left'#3#222#2#3'top'#3#141#1#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#9'N'
|
+'kgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#22'AutoWidthBorderSpa'
|
||||||
+'ew Item1'#0#0#0#10'TSynPHPSyn'#10'SynPHPSyn1'#13'DefaultFilter'#6'CPHP-Date'
|
+'cing'#2#15#0#0#9'TSpinEdit'#9'SpinEdit2'#4'Left'#2#15#6'Height'#2#23#3'Top'
|
||||||
+'ien (*.php,*.php3,*.phtml,*.inc)|*.php;*.php3;*.phtml;*.inc'#7'Enabled'#8#4
|
+#3'@'#1#5'Width'#2'O'#8'MinValue'#2#156#8'OnChange'#7#15'SpinEdit2Change'#8
|
||||||
+'left'#2's'#3'top'#3#255#0#0#0#0
|
+'TabOrder'#2#5#0#0#0#9'TSplitter'#9'Splitter1'#4'Left'#3#239#2#6'Height'#3
|
||||||
|
+#250#1#5'Width'#2#5#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#3#222#2#3'top'
|
||||||
|
+#3#141#1#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#9'New Item1'#0#0#0#10'TSyn'
|
||||||
|
+'PHPSyn'#10'SynPHPSyn1'#13'DefaultFilter'#6'CPHP-Dateien (*.php,*.php3,*.pht'
|
||||||
|
+'ml,*.inc)|*.php;*.php3;*.phtml;*.inc'#7'Enabled'#8#4'left'#2's'#3'top'#3#255
|
||||||
|
+#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -41,13 +41,12 @@ type
|
|||||||
{ TForm1 }
|
{ TForm1 }
|
||||||
|
|
||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
Arrow1: TArrow;
|
|
||||||
CheckBox1: TCheckBox;
|
CheckBox1: TCheckBox;
|
||||||
ComboBox1: TComboBox;
|
ComboBox1: TComboBox;
|
||||||
Edit1: TEdit;
|
Edit1: TEdit;
|
||||||
|
GradButton1: TGradButton;
|
||||||
GradTabControl1: TGradTabControl;
|
GradTabControl1: TGradTabControl;
|
||||||
GradTabPage1: TGradTabPage;
|
Label1: TLabel;
|
||||||
GradTabPage2: TGradTabPage;
|
|
||||||
Memo1: TMemo;
|
Memo1: TMemo;
|
||||||
Memo2: TMemo;
|
Memo2: TMemo;
|
||||||
MenuItem1: TMenuItem;
|
MenuItem1: TMenuItem;
|
||||||
@ -56,8 +55,8 @@ type
|
|||||||
Panel3: TPanel;
|
Panel3: TPanel;
|
||||||
PopupMenu1: TPopupMenu;
|
PopupMenu1: TPopupMenu;
|
||||||
RadioGroup1: TRadioGroup;
|
RadioGroup1: TRadioGroup;
|
||||||
ScrollBox1: TScrollBox;
|
|
||||||
SpinEdit1: TSpinEdit;
|
SpinEdit1: TSpinEdit;
|
||||||
|
SpinEdit2: TSpinEdit;
|
||||||
Splitter1: TSplitter;
|
Splitter1: TSplitter;
|
||||||
StringGrid1: TStringGrid;
|
StringGrid1: TStringGrid;
|
||||||
SynEdit1: TSynEdit;
|
SynEdit1: TSynEdit;
|
||||||
@ -78,6 +77,7 @@ type
|
|||||||
procedure GradButton1MouseUp(Sender: TObject; Button: TMouseButton;
|
procedure GradButton1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure GradButton2Click(Sender: TObject);
|
procedure GradButton2Click(Sender: TObject);
|
||||||
|
procedure BewegeBtn(Sender: TObject);
|
||||||
procedure GradButton3Click(Sender: TObject);
|
procedure GradButton3Click(Sender: TObject);
|
||||||
procedure GradButton4Click(Sender: TObject);
|
procedure GradButton4Click(Sender: TObject);
|
||||||
procedure GradTabControl1TabButtonClick(GradTabControl: TGradTabControl;
|
procedure GradTabControl1TabButtonClick(GradTabControl: TGradTabControl;
|
||||||
@ -86,8 +86,10 @@ type
|
|||||||
Button: TMouseButton; Shift: TShiftState; X, Y, AIndex: Integer);
|
Button: TMouseButton; Shift: TShiftState; X, Y, AIndex: Integer);
|
||||||
procedure GradTabControl2TabButtonClick(GradTabControl: TGradTabControl;
|
procedure GradTabControl2TabButtonClick(GradTabControl: TGradTabControl;
|
||||||
AIndex: Integer);
|
AIndex: Integer);
|
||||||
|
procedure Panel2Click(Sender: TObject);
|
||||||
procedure RadioGroup1Click(Sender: TObject);
|
procedure RadioGroup1Click(Sender: TObject);
|
||||||
procedure SpinEdit1EditingDone(Sender: TObject);
|
procedure SpinEdit1EditingDone(Sender: TObject);
|
||||||
|
procedure SpinEdit2Change(Sender: TObject);
|
||||||
//procedure FormPaint(Sender: TObject);
|
//procedure FormPaint(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
@ -126,6 +128,8 @@ begin
|
|||||||
|
|
||||||
GradTabControl1.Align:=alClient;
|
GradTabControl1.Align:=alClient;
|
||||||
GradTabControl1.TabPosition:=tpTop;
|
GradTabControl1.TabPosition:=tpTop;
|
||||||
|
GradTabControl1.MoveIncrement:=20;
|
||||||
|
SpinEdit2.Value:=20;
|
||||||
|
|
||||||
{ with TGradButton.Create(GradTabControl1) do
|
{ with TGradButton.Create(GradTabControl1) do
|
||||||
begin
|
begin
|
||||||
@ -280,54 +284,47 @@ procedure TForm1.GradButton2Click(Sender: TObject);
|
|||||||
var
|
var
|
||||||
C : Integer;
|
C : Integer;
|
||||||
begin
|
begin
|
||||||
with TTryOutPage.Create(Self) do
|
GradTabControl1.PagesBar.MoveTo(SpinEdit2.Value);
|
||||||
begin
|
|
||||||
Parent := GradTabControl1;
|
|
||||||
C := PageIndex;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ComboBox1.ItemIndex:=ComboBox1.Items.Add('Custom_'+IntToStr(GradTabControl1.Tabs.Count-1));
|
|
||||||
|
|
||||||
//WriteLn('CustomIndex: ', IntToStr(C));
|
|
||||||
|
|
||||||
GradTabControl1.Pages[C].Color:=clRed;
|
|
||||||
GradTabControl1.Pages[C].Caption:=ComboBox1.Text; //WICHTIG, eine Caption muss für
|
|
||||||
//die Eigenschaft Tabs gesetzt werden!
|
|
||||||
|
|
||||||
GradTabControl1.Pages[C].TabPopupMenu := PopupMenu1;
|
|
||||||
GradTabControl1.Pages[C].PopupMenu:= PopupMenu1;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.GradButton3Click(Sender: TObject);
|
procedure TForm1.BewegeBtn(Sender: TObject);
|
||||||
var
|
var
|
||||||
C,R,G,B : Integer;
|
C,R,G,B : Integer;
|
||||||
begin
|
begin
|
||||||
C := GradTabControl1.Tabs.Count;
|
C := GradTabControl1.Tabs.Count;
|
||||||
GradTabControl1.Tabs.Add('tab_'+IntToStr(C));
|
GradTabControl1.Tabs.Add('tab_'+IntToStr(C));
|
||||||
|
|
||||||
Randomize;
|
Randomize;
|
||||||
|
|
||||||
R := Random(255)+1;
|
R := Random(255)+1;
|
||||||
G := Random(255)+1;
|
G := Random(255)+1;
|
||||||
B := Random(255)+1;
|
B := Random(255)+1;
|
||||||
|
|
||||||
//WriteLn(R, ' ', G, ' ', B, ColorToString(RGBToColor(R,G,B)));
|
//WriteLn(R, ' ', G, ' ', B, ColorToString(RGBToColor(R,G,B)));
|
||||||
GradTabControl1.CurrentPage.Caption:='tab_'+IntToStr(C);
|
GradTabControl1.CurrentPage.Caption:='tab_'+IntToStr(C);
|
||||||
GradTabControl1.CurrentPage.Color:=RGBToColor(R, G, B);
|
GradTabControl1.CurrentPage.Color:=RGBToColor(R, G, B);
|
||||||
GradTabControl1.CurrentPage.TabPopupMenu := PopupMenu1;
|
GradTabControl1.CurrentPage.TabPopupMenu := PopupMenu1;
|
||||||
GradTabControl1.CurrentPage.PopupMenu:= PopupMenu1;
|
GradTabControl1.CurrentPage.PopupMenu:= PopupMenu1;
|
||||||
|
|
||||||
ComboBox1.ItemIndex:=ComboBox1.Items.Add('tab_'+IntToStr(C));
|
ComboBox1.ItemIndex:=ComboBox1.Items.Add('tab_'+IntToStr(C));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.GradButton3Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
C : Integer;
|
||||||
|
begin
|
||||||
|
GradTabControl1.PagesBar.MoveTo(50);
|
||||||
|
for C := 50 downto -20 do
|
||||||
|
begin
|
||||||
|
GradTabControl1.PagesBar.MoveTo(-1);
|
||||||
|
Sleep(5);
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.GradButton4Click(Sender: TObject);
|
procedure TForm1.GradButton4Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if GradTabControl1.Tabs.IndexOf(ComboBox1.Text) <> -1 then
|
GradTabControl1.PagesBar.MoveToNorm;
|
||||||
begin
|
|
||||||
GradTabControl1.Tabs.Delete(GradTabControl1.Tabs.IndexOf(ComboBox1.Text));
|
|
||||||
ComboBox1.Items.Delete(ComboBox1.Items.IndexOf(ComboBox1.Text));
|
|
||||||
ComboBox1.ItemIndex:=GradTabControl1.CurrentPageNum;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.GradTabControl1TabButtonClick(GradTabControl: TGradTabControl;
|
procedure TForm1.GradTabControl1TabButtonClick(GradTabControl: TGradTabControl;
|
||||||
@ -365,6 +362,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.Panel2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.RadioGroup1Click(Sender: TObject);
|
procedure TForm1.RadioGroup1Click(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
case RadioGroup1.ItemIndex of
|
case RadioGroup1.ItemIndex of
|
||||||
@ -380,6 +382,11 @@ begin
|
|||||||
GradTabControl1.LongWidth:=SpinEdit1.Value;
|
GradTabControl1.LongWidth:=SpinEdit1.Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.SpinEdit2Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
GradTabControl1.MoveIncrement:=SpinEdit2.Value;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<UseVersionInfo Value="True"/>
|
<UseVersionInfo Value="True"/>
|
||||||
<AutoIncrementBuild Value="True"/>
|
<AutoIncrementBuild Value="True"/>
|
||||||
<CurrentBuildNr Value="509"/>
|
<CurrentBuildNr Value="585"/>
|
||||||
<ProjectVersion Value="0.0.0.0"/>
|
<ProjectVersion Value="0.0.0.0"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item5>
|
</Item5>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="2">
|
<Units Count="3">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="gradcontroltest.lpr"/>
|
<Filename Value="gradcontroltest.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -65,6 +65,10 @@
|
|||||||
<ResourceFilename Value="Forms\unit1.lrs"/>
|
<ResourceFilename Value="Forms\unit1.lrs"/>
|
||||||
<UnitName Value="Unit1"/>
|
<UnitName Value="Unit1"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="..\src\ugradtabcontrol.lrs"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit2>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
@ -73,13 +77,11 @@
|
|||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="Forms\"/>
|
<OtherUnitFiles Value="Forms\"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Parsing>
|
||||||
<Options>
|
<SyntaxOptions>
|
||||||
<Win32>
|
<CStyleOperator Value="False"/>
|
||||||
<GraphicApplication Value="True"/>
|
</SyntaxOptions>
|
||||||
</Win32>
|
</Parsing>
|
||||||
</Options>
|
|
||||||
</Linking>
|
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
|
2309
components/gradcontrols/examples/silkicons.lrs
Normal file
2309
components/gradcontrols/examples/silkicons.lrs
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,15 +4,22 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Name Value="gradtabcontrol"/>
|
<Name Value="gradtabcontrol"/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="8"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<OtherUnitFiles Value="..\src\"/>
|
<OtherUnitFiles Value="..\src\"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
|
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<CodeGeneration>
|
<Parsing>
|
||||||
<Generate Value="Faster"/>
|
<SyntaxOptions>
|
||||||
</CodeGeneration>
|
<CStyleOperator Value="False"/>
|
||||||
|
</SyntaxOptions>
|
||||||
|
</Parsing>
|
||||||
|
<Linking>
|
||||||
|
<Debugging>
|
||||||
|
<UseHeaptrc Value="True"/>
|
||||||
|
</Debugging>
|
||||||
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
|
@ -33,6 +33,7 @@ type
|
|||||||
|
|
||||||
TGradButton = class(TCustomControl)
|
TGradButton = class(TCustomControl)
|
||||||
private
|
private
|
||||||
|
FAutoWidthBorderSpacing: Integer;
|
||||||
FRotateDirection : TRotateDirection;
|
FRotateDirection : TRotateDirection;
|
||||||
FTextAlignment : TTextAlignment;
|
FTextAlignment : TTextAlignment;
|
||||||
FButtonLayout: TButtonLayout;
|
FButtonLayout: TButtonLayout;
|
||||||
@ -52,6 +53,7 @@ type
|
|||||||
FOnNormalBackgroundPaint, FOnHotBackgroundPaint,
|
FOnNormalBackgroundPaint, FOnHotBackgroundPaint,
|
||||||
FOnDownBackgroundPaint, FOnDisabledBackgroundPaint : TGBBackgroundPaintEvent;
|
FOnDownBackgroundPaint, FOnDisabledBackgroundPaint : TGBBackgroundPaintEvent;
|
||||||
procedure PaintGradient(TrgCanvas: TCanvas; pr : TRect);
|
procedure PaintGradient(TrgCanvas: TCanvas; pr : TRect);
|
||||||
|
procedure SetAutoWidthBorderSpacing(const AValue: Integer);
|
||||||
procedure UpdateText;
|
procedure UpdateText;
|
||||||
procedure UpdateBackground;
|
procedure UpdateBackground;
|
||||||
procedure PaintBackground(AState: TButtonState; TrgBitmap: TBitmap);
|
procedure PaintBackground(AState: TButtonState; TrgBitmap: TBitmap);
|
||||||
@ -154,6 +156,7 @@ type
|
|||||||
property ClickColor : TColor read FClickColor write SetClickColor;
|
property ClickColor : TColor read FClickColor write SetClickColor;
|
||||||
property DisabledColor : TColor read FDisabledColor write SetDisabledColor default clGray;
|
property DisabledColor : TColor read FDisabledColor write SetDisabledColor default clGray;
|
||||||
property OwnerBackgroundDraw : Boolean read FOwnerBackgroundDraw write SetOwnerBackgroundDraw;
|
property OwnerBackgroundDraw : Boolean read FOwnerBackgroundDraw write SetOwnerBackgroundDraw;
|
||||||
|
property AutoWidthBorderSpacing : Integer read FAutoWidthBorderSpacing write SetAutoWidthBorderSpacing;
|
||||||
|
|
||||||
//property OnGetBackgroundRect { TODO }
|
//property OnGetBackgroundRect { TODO }
|
||||||
|
|
||||||
@ -241,7 +244,9 @@ end;
|
|||||||
|
|
||||||
procedure TGradButton.SetAutoWidth(const Value : Boolean);
|
procedure TGradButton.SetAutoWidth(const Value : Boolean);
|
||||||
begin
|
begin
|
||||||
FAutoWidth:=true;
|
if FAutoWidth = Value then
|
||||||
|
Exit;
|
||||||
|
FAutoWidth := Value;
|
||||||
|
|
||||||
UpdateButton;
|
UpdateButton;
|
||||||
end;
|
end;
|
||||||
@ -621,20 +626,20 @@ begin
|
|||||||
if FRotateDirection = rdNormal then begin
|
if FRotateDirection = rdNormal then begin
|
||||||
if FShowGlyph then begin
|
if FShowGlyph then begin
|
||||||
if FButtonLayout in [blGlyphLeft,blGlyphRight] then
|
if FButtonLayout in [blGlyphLeft,blGlyphRight] then
|
||||||
Width := FRotatedText.Width+ FRotatedGlyph.Width+FTextGlyphSpacing+15
|
Width := FRotatedText.Width+ FRotatedGlyph.Width+FTextGlyphSpacing+FAutoWidthBorderSpacing
|
||||||
else
|
else
|
||||||
Width := Max(FRotatedText.Width,FRotatedGlyph.Width)+15;
|
Width := Max(FRotatedText.Width,FRotatedGlyph.Width)+FAutoWidthBorderSpacing;
|
||||||
end else begin
|
end else begin
|
||||||
Width:= FRotatedText.Width+15;
|
Width:= FRotatedText.Width+FAutoWidthBorderSpacing;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
if FShowGlyph then begin
|
if FShowGlyph then begin
|
||||||
if FButtonLayout in [blGlyphTop,blGlyphBottom] then
|
if FButtonLayout in [blGlyphTop,blGlyphBottom] then
|
||||||
Height := FRotatedText.Height+ FRotatedGlyph.Height+FTextGlyphSpacing+15
|
Height := FRotatedText.Height+ FRotatedGlyph.Height+FTextGlyphSpacing+FAutoWidthBorderSpacing
|
||||||
else
|
else
|
||||||
Height := Max(FRotatedText.Height,FRotatedGlyph.Height)+15;
|
Height := Max(FRotatedText.Height,FRotatedGlyph.Height)+FAutoWidthBorderSpacing;
|
||||||
end else begin
|
end else begin
|
||||||
Height := FRotatedText.Height+15;
|
Height := FRotatedText.Height+FAutoWidthBorderSpacing;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -658,6 +663,8 @@ end;
|
|||||||
|
|
||||||
procedure TGradButton.SetRotateDirection(const Value: TRotateDirection);
|
procedure TGradButton.SetRotateDirection(const Value: TRotateDirection);
|
||||||
begin
|
begin
|
||||||
|
if FRotateDirection = Value then
|
||||||
|
Exit;
|
||||||
FRotateDirection:=Value;
|
FRotateDirection:=Value;
|
||||||
|
|
||||||
//Rotate and Cache
|
//Rotate and Cache
|
||||||
@ -682,6 +689,8 @@ end;
|
|||||||
|
|
||||||
procedure TGradButton.SetGradientType(const Value: TGradientType);
|
procedure TGradButton.SetGradientType(const Value: TGradientType);
|
||||||
begin
|
begin
|
||||||
|
if FGradientType = Value then
|
||||||
|
Exit;
|
||||||
FGradientType:=Value;
|
FGradientType:=Value;
|
||||||
|
|
||||||
UpdateBackground;
|
UpdateBackground;
|
||||||
@ -778,6 +787,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TGradButton.SetAutoWidthBorderSpacing(const AValue: Integer);
|
||||||
|
begin
|
||||||
|
if FAutoWidthBorderSpacing=AValue then exit;
|
||||||
|
FAutoWidthBorderSpacing:=AValue;
|
||||||
|
|
||||||
|
UpdateButton;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TGradButton.Create(AOwner: TComponent);
|
constructor TGradButton.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
@ -785,6 +802,7 @@ begin
|
|||||||
Width:=80;
|
Width:=80;
|
||||||
Height:=25;
|
Height:=25;
|
||||||
|
|
||||||
|
FAutoWidthBorderSpacing:=15;
|
||||||
FNormalBlend:=0.5;
|
FNormalBlend:=0.5;
|
||||||
FOverBlend:=0.653;
|
FOverBlend:=0.653;
|
||||||
FBaseColor:=clBlue;
|
FBaseColor:=clBlue;
|
||||||
@ -836,21 +854,21 @@ end;
|
|||||||
|
|
||||||
destructor TGradButton.Destroy;
|
destructor TGradButton.Destroy;
|
||||||
begin
|
begin
|
||||||
DebugLn('bm.Free');
|
//DebugLn('bm.Free');
|
||||||
bm.Free;
|
bm.Free;
|
||||||
DebugLn('FRotatedGlyph.Free');
|
//DebugLn('FRotatedGlyph.Free');
|
||||||
FRotatedGlyph.Free;
|
FRotatedGlyph.Free;
|
||||||
DebugLn('FRotatedText.Free');
|
//DebugLn('FRotatedText.Free');
|
||||||
FRotatedText.Free;
|
FRotatedText.Free;
|
||||||
DebugLn('FBackground.Free');
|
//DebugLn('FBackground.Free');
|
||||||
FBackground.Free;
|
FBackground.Free;
|
||||||
DebugLn('FNormalBackgroundCache.Free');
|
//DebugLn('FNormalBackgroundCache.Free');
|
||||||
FNormalBackgroundCache.Free;
|
FNormalBackgroundCache.Free;
|
||||||
DebugLn('FHotBackgroundCache.Free');
|
//DebugLn('FHotBackgroundCache.Free');
|
||||||
FHotBackgroundCache.Free;
|
FHotBackgroundCache.Free;
|
||||||
DebugLn('FDownBackgroundCache.Free');
|
//DebugLn('FDownBackgroundCache.Free');
|
||||||
FDownBackgroundCache.Free;
|
FDownBackgroundCache.Free;
|
||||||
DebugLn('FDisabledBackgroundCache.Free');
|
//DebugLn('FDisabledBackgroundCache.Free');
|
||||||
FDisabledBackgroundCache.Free;
|
FDisabledBackgroundCache.Free;
|
||||||
|
|
||||||
|
|
||||||
@ -862,6 +880,7 @@ begin
|
|||||||
FBorderSides:=Value;
|
FBorderSides:=Value;
|
||||||
|
|
||||||
UpdateBackground;
|
UpdateBackground;
|
||||||
|
UpdatePositions;
|
||||||
|
|
||||||
InvPaint;
|
InvPaint;
|
||||||
end;
|
end;
|
||||||
|
@ -24,6 +24,8 @@ uses
|
|||||||
type
|
type
|
||||||
TGradTabControl = class;
|
TGradTabControl = class;
|
||||||
|
|
||||||
|
{ TGradTabPageButton }
|
||||||
|
|
||||||
TGradTabPageButton = class( TGradButton )
|
TGradTabPageButton = class( TGradButton )
|
||||||
private
|
private
|
||||||
FCloseButton : TGradButton;
|
FCloseButton : TGradButton;
|
||||||
@ -35,6 +37,7 @@ type
|
|||||||
procedure RealSetText(const Value: TCaption); override;
|
procedure RealSetText(const Value: TCaption); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
|
destructor Destroy; override;
|
||||||
procedure Resize; override;
|
procedure Resize; override;
|
||||||
property ShowCloseButton : Boolean read FShowCloseButton write SetShowCloseButton default false;
|
property ShowCloseButton : Boolean read FShowCloseButton write SetShowCloseButton default false;
|
||||||
end;
|
end;
|
||||||
@ -84,10 +87,13 @@ type
|
|||||||
//angezeigt werden können
|
//angezeigt werden können
|
||||||
//ohne ihre größe zu ändern^^
|
//ohne ihre größe zu ändern^^
|
||||||
//Die Tab wechsel Effekte werden nur auf diesem Control ausgeführt
|
//Die Tab wechsel Effekte werden nur auf diesem Control ausgeführt
|
||||||
|
|
||||||
|
{ TGradTabPagesBar }
|
||||||
|
|
||||||
TGradTabPagesBar = class(TCustomControl)
|
TGradTabPagesBar = class(TCustomControl)
|
||||||
private
|
private
|
||||||
FPageList : TListWithEvent;
|
FPageList : TListWithEvent;
|
||||||
FShowFromButton : Integer;
|
FShowFromButton, FMovedTo : Integer;
|
||||||
FTabPosition : TTabPosition;
|
FTabPosition : TTabPosition;
|
||||||
FTabHeight,FLongWidth : Integer;
|
FTabHeight,FLongWidth : Integer;
|
||||||
FActiveIndex: Integer;
|
FActiveIndex: Integer;
|
||||||
@ -96,10 +102,15 @@ type
|
|||||||
procedure OrderButtons;
|
procedure OrderButtons;
|
||||||
procedure UnFocusButton(Index: Integer);
|
procedure UnFocusButton(Index: Integer);
|
||||||
procedure FocusButton(Index: Integer);
|
procedure FocusButton(Index: Integer);
|
||||||
procedure SetTabPosition(Value: TTabPosition);
|
procedure SetTabPosition(Value:
|
||||||
|
TTabPosition);
|
||||||
|
function IsVisible(Index: Integer) : Boolean;
|
||||||
|
procedure ChangeLeftTop(LastTabPosition : TTabPosition);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent; var thePageList: TListWithEvent);
|
constructor Create(AOwner: TComponent; var thePageList: TListWithEvent);
|
||||||
procedure Paint; override;
|
procedure Paint; override;
|
||||||
|
procedure MoveTo(Num: Integer);
|
||||||
|
procedure MoveToNorm;
|
||||||
property TabPosition : TTabPosition read FTabPosition write SetTabPosition;
|
property TabPosition : TTabPosition read FTabPosition write SetTabPosition;
|
||||||
//destructor Destroy; override;
|
//destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
@ -136,11 +147,15 @@ type
|
|||||||
procedure Move(CurIndex, NewIndex: Integer); override;
|
procedure Move(CurIndex, NewIndex: Integer); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TGradTabControl }
|
||||||
|
|
||||||
TGradTabControl = class(TCustomControl)
|
TGradTabControl = class(TCustomControl)
|
||||||
private
|
private
|
||||||
|
FMoveIncrement: Integer;
|
||||||
|
FLeftButton, FRightButton : TGradButton;
|
||||||
FTabStrings : TStrings; //TGradTabPages
|
FTabStrings : TStrings; //TGradTabPages
|
||||||
FPageList: TList; //Wird von TGradTabPages verwaltet
|
FPageList: TList; //Is Managed by TGradTabPages
|
||||||
FTabList : TList; //Dito :D
|
FTabList : TList; //Also ^^
|
||||||
FOnTabButtonClick : TGradTabPageButtonClickEvent;
|
FOnTabButtonClick : TGradTabPageButtonClickEvent;
|
||||||
FOnTabButtonMouseDown,
|
FOnTabButtonMouseDown,
|
||||||
FOnTabButtonMouseUp : TGradTabPageButtonMouseDownUpEvent;
|
FOnTabButtonMouseUp : TGradTabPageButtonMouseDownUpEvent;
|
||||||
@ -163,6 +178,8 @@ type
|
|||||||
procedure PageButtonMouseUp(Sender: TObject; Button: TMouseButton;
|
procedure PageButtonMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure PageButtonMouseClick(Sender: TObject);
|
procedure PageButtonMouseClick(Sender: TObject);
|
||||||
|
procedure MoveLeftTopClick(Sender: TObject);
|
||||||
|
procedure MoveRightBottomClick(Sender: TObject);
|
||||||
procedure PageRemoved(Index: Integer);
|
procedure PageRemoved(Index: Integer);
|
||||||
procedure SetCurrentPage(Value : TGradTabPage);
|
procedure SetCurrentPage(Value : TGradTabPage);
|
||||||
procedure SetCurrentPageNum(Value: Integer);
|
procedure SetCurrentPageNum(Value: Integer);
|
||||||
@ -214,11 +231,13 @@ type
|
|||||||
property PageCount : Integer read GetCount;
|
property PageCount : Integer read GetCount;
|
||||||
property LongTabs : Boolean read FLongTabs write SetLongTabs;
|
property LongTabs : Boolean read FLongTabs write SetLongTabs;
|
||||||
property LongWidth: Integer read FLongWidth write FLongWidth;
|
property LongWidth: Integer read FLongWidth write FLongWidth;
|
||||||
|
property MoveIncrement : Integer read FMoveIncrement write FMoveIncrement;
|
||||||
//property ShowTabs : Boolean; { TODO }
|
//property ShowTabs : Boolean; { TODO }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
function IsAssigned(var Obj : TObject) : String;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -238,6 +257,11 @@ begin
|
|||||||
RegisterNoIcon([TGradTabPage]);
|
RegisterNoIcon([TGradTabPage]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsAssigned(var Obj: TObject): String;
|
||||||
|
begin
|
||||||
|
Result := 'Assigned: '+BoolToStr(Assigned(Obj),true);
|
||||||
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
TGradTabPageButton Create(AOwner: TComponent
|
TGradTabPageButton Create(AOwner: TComponent
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -249,20 +273,30 @@ begin
|
|||||||
FCloseButton := TGradButton.Create(Self);
|
FCloseButton := TGradButton.Create(Self);
|
||||||
FCloseButton.Width:=12;
|
FCloseButton.Width:=12;
|
||||||
FCloseButton.Height:=12;
|
FCloseButton.Height:=12;
|
||||||
TextAlignment:=taLeftJustify;
|
TextAlignment:=taCenter;
|
||||||
FCloseButton.Left:=1;
|
FCloseButton.Left:=1;
|
||||||
FCloseButton.Top:=1;
|
FCloseButton.Top:=1;
|
||||||
FCloseButton.Caption:='X';
|
FCloseButton.Caption:='';
|
||||||
|
FCloseButton.Glyph.Assign(CreateBitmapFromLazarusResource('close_btn'));
|
||||||
|
FCloseButton.ShowGlyph:=true;
|
||||||
|
|
||||||
FCloseButton.BorderSides:=[];
|
FCloseButton.BorderSides:=[];
|
||||||
FCloseButton.Color:=clRed;
|
FCloseButton.Color:=clRed;
|
||||||
//FCloseButton.Visible:=false;
|
//FCloseButton.Visible:=false;
|
||||||
//FCloseButton.Parent := Self;
|
//FCloseButton.Parent := Self;
|
||||||
|
|
||||||
FShowCloseButton:=false;
|
FShowCloseButton:=true;
|
||||||
|
|
||||||
SetSubComponent(true);
|
SetSubComponent(true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
destructor TGradTabPageButton.Destroy;
|
||||||
|
begin
|
||||||
|
FCloseButton.Free;
|
||||||
|
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
TGradTabPageButton AlignCloseButton
|
TGradTabPageButton AlignCloseButton
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -593,7 +627,7 @@ procedure TGradTabPage.Paint;
|
|||||||
var
|
var
|
||||||
i : Integer;
|
i : Integer;
|
||||||
begin
|
begin
|
||||||
for i := 0 to Height do
|
{for i := 0 to Height do
|
||||||
begin
|
begin
|
||||||
Canvas.Pen.Color:=ColorBetween(Color,Parent.Color,i / (Height ));
|
Canvas.Pen.Color:=ColorBetween(Color,Parent.Color,i / (Height ));
|
||||||
|
|
||||||
@ -603,7 +637,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
Canvas.TextOut(Width-Canvas.TextWidth(DbgSName(Self)),0,DbgSName(Self));
|
Canvas.TextOut(Width-Canvas.TextWidth(DbgSName(Self)),0,DbgSName(Self));
|
||||||
|
}
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -641,6 +675,8 @@ begin
|
|||||||
FShowFromButton:=0;
|
FShowFromButton:=0;
|
||||||
ControlStyle := ControlStyle+[csNoDesignSelectable];
|
ControlStyle := ControlStyle+[csNoDesignSelectable];
|
||||||
FTabPosition:=tpTop;
|
FTabPosition:=tpTop;
|
||||||
|
FMovedTo:=1;
|
||||||
|
|
||||||
{Enabled:=false;
|
{Enabled:=false;
|
||||||
NotEnabledColor:=Color;
|
NotEnabledColor:=Color;
|
||||||
BorderSides:=[];
|
BorderSides:=[];
|
||||||
@ -653,7 +689,7 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TGradTabPagesBar.Paint;
|
procedure TGradTabPagesBar.Paint;
|
||||||
begin
|
begin
|
||||||
{ Canvas.Brush.Color:=clBlue;
|
{Canvas.Brush.Color:=clBlue;
|
||||||
Canvas.FillRect(0,0,Width,Height);
|
Canvas.FillRect(0,0,Width,Height);
|
||||||
}
|
}
|
||||||
//WriteLn(Left, ' ' ,Top, ' ' ,Width, ' ' ,Height);
|
//WriteLn(Left, ' ' ,Top, ' ' ,Width, ' ' ,Height);
|
||||||
@ -665,13 +701,21 @@ end;
|
|||||||
TGradTabPagesBar InsertButton(AButton: TGradTabPageButton; Index: Integer)
|
TGradTabPagesBar InsertButton(AButton: TGradTabPageButton; Index: Integer)
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TGradTabPagesBar.InsertButton(AButton: TGradTabPageButton; Index: Integer);
|
procedure TGradTabPagesBar.InsertButton(AButton: TGradTabPageButton; Index: Integer);
|
||||||
|
var
|
||||||
|
LastLeft : Integer;
|
||||||
begin
|
begin
|
||||||
|
Left := 0;
|
||||||
|
|
||||||
|
if (Index >= 1) AND (FPageList.Count>=1) then
|
||||||
|
LastLeft := TGradTabPage(FPageList.Items[Index-1]).TabButton.Left;
|
||||||
|
|
||||||
with AButton do
|
with AButton do
|
||||||
begin
|
begin
|
||||||
Left := -123;
|
Left := -123;
|
||||||
Parent := Self;
|
Parent := Self;
|
||||||
ShowFocusBorder:=false;
|
ShowFocusBorder:=false;
|
||||||
AutoWidth:=true;
|
AutoWidth:=true;
|
||||||
|
TextAlignment:=taCenter;
|
||||||
BorderSides:=[bsTopLine,bsRightLine,bsLeftLine];
|
BorderSides:=[bsTopLine,bsRightLine,bsLeftLine];
|
||||||
OnMouseDown:=@((Self.Owner as TGradTabControl).PageButtonMouseDown);
|
OnMouseDown:=@((Self.Owner as TGradTabControl).PageButtonMouseDown);
|
||||||
OnMouseUp:=@((Self.Owner as TGradTabControl).PageButtonMouseUp);
|
OnMouseUp:=@((Self.Owner as TGradTabControl).PageButtonMouseUp);
|
||||||
@ -687,99 +731,148 @@ begin
|
|||||||
|
|
||||||
FocusButton(Index);
|
FocusButton(Index);
|
||||||
|
|
||||||
OrderButtons;
|
//OrderButtons;
|
||||||
|
|
||||||
//WriteLn('TGradTabPagesBar.InsertButton');
|
//WriteLn('TGradTabPagesBar.InsertButton');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TGradTabPagesBar.MoveTo(Num: Integer);
|
||||||
|
|
||||||
|
function GetLast : Integer;
|
||||||
|
var
|
||||||
|
Btn : TGradButton;
|
||||||
|
i,l : Integer;
|
||||||
|
begin
|
||||||
|
Result := 1;
|
||||||
|
if FPageList.Count = 0 then Exit;
|
||||||
|
|
||||||
|
l := 1;
|
||||||
|
|
||||||
|
for i := 0 to FPageList.Count-2 do
|
||||||
|
begin
|
||||||
|
Btn := TGradTabPage(FPageList.Items[i]).TabButton;
|
||||||
|
|
||||||
|
L := L +1;
|
||||||
|
|
||||||
|
if TabPosition in [tpTop, tpBottom] then begin
|
||||||
|
L := L + Btn.Width;
|
||||||
|
//if Result > Width then Result := Result - Width;
|
||||||
|
end else begin
|
||||||
|
L := L + Btn.Height;
|
||||||
|
//if Result > Height then Result := Result - Height;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Result := l;
|
||||||
|
|
||||||
|
//Result :=
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
i : Integer;
|
||||||
|
begin
|
||||||
|
//if Num = FMovedTo then Exit;
|
||||||
|
|
||||||
|
{for i := 0 to FPageList.Count-1 do
|
||||||
|
begin
|
||||||
|
with TGradTabPage(FPageList.Items[i]).TabButton do
|
||||||
|
if TabPosition in [tpTop, tpBottom] then begin
|
||||||
|
Left := Left + Num;
|
||||||
|
end else begin
|
||||||
|
Top := Top + Num;
|
||||||
|
end;
|
||||||
|
end;}
|
||||||
|
|
||||||
|
DebugLn('Max: %d, Current: %d',[GetLast+1,FMovedTo]);
|
||||||
|
|
||||||
|
FMovedTo:=FMovedTo + Num;
|
||||||
|
|
||||||
|
if FMovedTo > 1 then FMovedTo := 1;
|
||||||
|
if FMovedTo < -GetLast then FMovedTo := -GetLast+2;
|
||||||
|
|
||||||
|
OrderButtons;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradTabPagesBar.MoveToNorm;
|
||||||
|
begin
|
||||||
|
FMovedTo:=1;
|
||||||
|
|
||||||
|
OrderButtons;
|
||||||
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
TGradTabPagesBar OrderButtons
|
TGradTabPagesBar OrderButtons
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TGradTabPagesBar.OrderButtons;
|
procedure TGradTabPagesBar.OrderButtons;
|
||||||
var
|
var
|
||||||
LastLeft,LastTop,i : Integer;
|
LastLeft, LastTop, i: Integer;
|
||||||
FGradTabControl : TGradTabControl;
|
NewDirection: TRotateDirection;
|
||||||
FButton : TGradTabPageButton;
|
NewBorderSides: TBorderSides;
|
||||||
|
NewGradientType: TGradientType;
|
||||||
begin
|
begin
|
||||||
LastLeft:= 1;
|
DebugLn('OrderButton Start');
|
||||||
LastTop := 1;
|
|
||||||
|
|
||||||
FGradTabControl := TGradTabControl(Parent.Parent);
|
LastLeft:= FMovedTo;
|
||||||
|
LastTop := FMovedTo;
|
||||||
|
|
||||||
for i := 0 to FPageList.Count-1 do
|
case FTabPosition of
|
||||||
with TGradTabPage(FPageList.Items[i]).TabButton do
|
tpTop:
|
||||||
begin
|
|
||||||
if Visible then begin
|
|
||||||
if FActiveIndex=i
|
|
||||||
then FocusButton(i)
|
|
||||||
else UnFocusButton(i);
|
|
||||||
end else begin
|
|
||||||
Left := -Width;
|
|
||||||
Top := -Height;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
DebugLn('OrderButton Start');
|
|
||||||
|
|
||||||
if FTabPosition in [tpTop,tpBottom] then begin
|
|
||||||
for i := 0 to FPageList.Count-1 do
|
|
||||||
with TGradTabPage(FPageList.Items[i]).TabButton do
|
|
||||||
begin
|
begin
|
||||||
if Visible then
|
NewBorderSides := [bsTopLine, bsRightLine, bsLeftLine];
|
||||||
begin
|
NewGradientType := gtHorizontal;
|
||||||
DebugLn('I: %d W: %d H: %d L: %d T: %d',[i,Width,Height,Left,Top]);
|
NewDirection := rdNormal;
|
||||||
|
|
||||||
if RotateDirection <> rdNormal then
|
|
||||||
RotateDirection:=rdNormal;
|
|
||||||
|
|
||||||
case FTabPosition of
|
|
||||||
tpTop: begin
|
|
||||||
BorderSides:=[bsTopLine,bsRightLine,bsLeftLine];
|
|
||||||
end;
|
|
||||||
tpBottom : begin
|
|
||||||
BorderSides:=[bsBottomLine,bsRightLine,bsLeftLine];
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if GradientType<>gtHorizontal then
|
|
||||||
GradientType:=gtHorizontal;
|
|
||||||
|
|
||||||
Left := LastLeft;
|
|
||||||
LastLeft:=LastLeft+Width+1;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end else begin
|
tpBottom:
|
||||||
for i := 0 to FPageList.Count-1 do
|
|
||||||
with TGradTabPage(FPageList.Items[i]).TabButton do
|
|
||||||
begin
|
begin
|
||||||
if Visible then
|
NewBorderSides := [bsBottomLine, bsRightLine, bsLeftLine];
|
||||||
begin
|
NewGradientType := gtHorizontal;
|
||||||
case FTabPosition of
|
NewDirection := rdNormal;
|
||||||
tpRight: begin
|
|
||||||
if RotateDirection<>rdRight then
|
|
||||||
RotateDirection := rdRight;
|
|
||||||
|
|
||||||
BorderSides:=[bsTopLine,bsBottomLine,bsRightLine];
|
|
||||||
end;
|
|
||||||
tpLeft: begin
|
|
||||||
if RotateDirection<>rdLeft then
|
|
||||||
RotateDirection := rdLeft;
|
|
||||||
|
|
||||||
BorderSides:=[bsTopLine,bsBottomLine,bsLeftLine];
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
if GradientType<>gtVertical then
|
|
||||||
GradientType:=gtVertical;
|
|
||||||
|
|
||||||
Top := LastTop;
|
|
||||||
//Left := 0;
|
|
||||||
LastTop:=LastTop+Height+1;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
tpLeft:
|
||||||
|
begin
|
||||||
|
NewBorderSides := [bsTopLine, bsBottomLine, bsLeftLine];
|
||||||
|
NewGradientType := gtVertical;
|
||||||
|
NewDirection := rdLeft;
|
||||||
|
end;
|
||||||
|
tpRight:
|
||||||
|
begin
|
||||||
|
NewBorderSides := [bsTopLine, bsBottomLine, bsRightLine];
|
||||||
|
NewGradientType := gtVertical;
|
||||||
|
NewDirection := rdRight;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
DebugLn('OrderButton End');
|
for i := 0 to FPageList.Count - 1 do
|
||||||
|
with TGradTabPage(FPageList.Items[i]).TabButton do
|
||||||
|
begin
|
||||||
|
if Visible then
|
||||||
|
begin
|
||||||
|
DebugLn('I: %d W: %d H: %d L: %d T: %d',[i,Width,Height,Left,Top]);
|
||||||
|
|
||||||
|
RotateDirection := NewDirection;
|
||||||
|
|
||||||
|
{if FActiveIndex = i then
|
||||||
|
FocusButton(i)
|
||||||
|
else
|
||||||
|
UnFocusButton(i);
|
||||||
|
}
|
||||||
|
BorderSides := NewBorderSides;
|
||||||
|
GradientType := NewGradientType;
|
||||||
|
|
||||||
|
if FTabPosition in [tpTop, tpBottom] then
|
||||||
|
begin
|
||||||
|
Left := LastLeft;
|
||||||
|
LastLeft := LastLeft + Width + 1;
|
||||||
|
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Top := LastTop;
|
||||||
|
LastTop := LastTop + Height + 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
DebugLn('OrderButton End');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
@ -836,27 +929,16 @@ begin
|
|||||||
with TGradTabPage(FPageList.Items[Index]).TabButton do
|
with TGradTabPage(FPageList.Items[Index]).TabButton do
|
||||||
begin
|
begin
|
||||||
case FTabPosition of
|
case FTabPosition of
|
||||||
tpTop : begin
|
tpTop, tpBottom : begin
|
||||||
Top:=0;
|
Top:=0;
|
||||||
Height:=Self.Height;
|
Height:=Self.Height;
|
||||||
end;
|
end;
|
||||||
tpBottom: begin
|
tpRight, tpLeft: begin
|
||||||
Top:=0;
|
|
||||||
Height:=Self.Height;
|
|
||||||
end;
|
|
||||||
tpRight: begin
|
|
||||||
Left := 0;
|
Left := 0;
|
||||||
Width:= Self.Width;
|
Width:= Self.Width;
|
||||||
end;
|
end;
|
||||||
tpLeft: begin
|
|
||||||
Left := 0;
|
|
||||||
Width:=Self.Width;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Color := clGreen;
|
Color := clGreen;
|
||||||
|
|
||||||
UpdatePositions;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -870,6 +952,25 @@ begin
|
|||||||
OrderButtons;
|
OrderButtons;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TGradTabPagesBar.IsVisible(Index: Integer): Boolean;
|
||||||
|
var
|
||||||
|
TheButton : TGradTabPageButton;
|
||||||
|
begin
|
||||||
|
if (Index < 0) or (Index >= FPageList.Count) then Exit;
|
||||||
|
|
||||||
|
TheButton := TGradTabPage(FPageList.Items[Index]).TabButton;
|
||||||
|
|
||||||
|
if TabPosition in [tpTop, tpBottom] then
|
||||||
|
Result := TheButton.Visible AND (TheButton.Left >= 0) AND (TheButton.Left <= Width)
|
||||||
|
else
|
||||||
|
Result := TheButton.Visible AND (TheButton.Top >= 0) AND (TheButton.Left <= Height);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradTabPagesBar.ChangeLeftTop(LastTabPosition: TTabPosition);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
TGradTabPagesBar Create(AOwner: TComponent)
|
TGradTabPagesBar Create(AOwner: TComponent)
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -1162,6 +1263,8 @@ begin
|
|||||||
FBar.Parent := Self;
|
FBar.Parent := Self;
|
||||||
//FBar.Align:=alTop;
|
//FBar.Align:=alTop;
|
||||||
|
|
||||||
|
FMoveIncrement:=1;
|
||||||
|
|
||||||
FPagesBar := TGradTabPagesBar.Create(Self,TListWithEvent(FPageList));
|
FPagesBar := TGradTabPagesBar.Create(Self,TListWithEvent(FPageList));
|
||||||
FPagesBar.Parent:=FBar;
|
FPagesBar.Parent:=FBar;
|
||||||
FPagesBar.Align:=alClient;
|
FPagesBar.Align:=alClient;
|
||||||
@ -1170,6 +1273,20 @@ begin
|
|||||||
FPagesBar.Width:=FBar.Width;
|
FPagesBar.Width:=FBar.Width;
|
||||||
FPagesBar.Height:=FBar.Height;
|
FPagesBar.Height:=FBar.Height;
|
||||||
|
|
||||||
|
FLeftButton := TGradButton.Create(Self);
|
||||||
|
FLeftButton.Parent := FBar;
|
||||||
|
FLeftButton.Align:= alLeft;
|
||||||
|
FLeftButton.Caption:='<';
|
||||||
|
FLeftButton.AutoWidth:=true;
|
||||||
|
FLeftButton.OnClick:=@MoveLeftTopClick;
|
||||||
|
|
||||||
|
FRightButton := TGradButton.Create(Self);
|
||||||
|
FRightButton.Parent := FBar;
|
||||||
|
FRightButton.Align:= alRight;
|
||||||
|
FRightButton.Caption:='>';
|
||||||
|
FRightButton.AutoWidth:=true;
|
||||||
|
FRightButton.OnClick:=@MoveRightBottomClick;
|
||||||
|
|
||||||
Height:=200;
|
Height:=200;
|
||||||
Width:=200;
|
Width:=200;
|
||||||
end;
|
end;
|
||||||
@ -1191,12 +1308,26 @@ begin
|
|||||||
DebugLn('A FreeAndNil(FPageList)');
|
DebugLn('A FreeAndNil(FPageList)');
|
||||||
DebugLn('B FreeAndNil(FTabList)');
|
DebugLn('B FreeAndNil(FTabList)');
|
||||||
FreeAndNil(FTabList);
|
FreeAndNil(FTabList);
|
||||||
DebugLn('B FreeAndNil(FTabList)');
|
DebugLn('A FreeAndNil(FTabList)');
|
||||||
|
DebugLn('B FreeAndNil(FPagesBar)');
|
||||||
|
DebugLn(IsAssigned(FPagesBar));
|
||||||
|
|
||||||
FBar.Free;
|
FLeftButton.Free;
|
||||||
|
FRightButton.Free;
|
||||||
|
|
||||||
|
//FPagesBar.Parent := nil;
|
||||||
|
DebugLn('B Free');
|
||||||
|
//FPagesBar.Free;
|
||||||
|
DebugLn('A FreeAndNil(FPagesBar)');
|
||||||
|
DebugLn('B FreeAndNil(FBar)');
|
||||||
|
DebugLn(IsAssigned(FBar));
|
||||||
|
//FBar.Parent := nil;
|
||||||
|
DebugLn('B Free');
|
||||||
|
//FBar.Free;
|
||||||
|
DebugLn('A FreeAndNil(FBar)');
|
||||||
DebugLn('TGradTabControl.Destroy End');
|
DebugLn('TGradTabControl.Destroy End');
|
||||||
|
|
||||||
|
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1328,6 +1459,16 @@ begin
|
|||||||
FOnTabButtonClick(Self, FPageList.IndexOf(AButton.Owner));
|
FOnTabButtonClick(Self, FPageList.IndexOf(AButton.Owner));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TGradTabControl.MoveLeftTopClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PagesBar.MoveTo(FMoveIncrement);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradTabControl.MoveRightBottomClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
PagesBar.MoveTo(-FMoveIncrement);
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
TGradTabControl PageRemoved(Index: Integer)
|
TGradTabControl PageRemoved(Index: Integer)
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -1494,8 +1635,6 @@ begin
|
|||||||
|
|
||||||
//FPagesBar.InsertButton(APage.FButton,Index);
|
//FPagesBar.InsertButton(APage.FButton,Index);
|
||||||
|
|
||||||
FPagesBar.OrderButtons;
|
|
||||||
|
|
||||||
if HandleAllocated and (not (csLoading in ComponentState)) then begin
|
if HandleAllocated and (not (csLoading in ComponentState)) then begin
|
||||||
AddRemovePageHandle(APage);
|
AddRemovePageHandle(APage);
|
||||||
if PageIndex = Index then
|
if PageIndex = Index then
|
||||||
@ -1512,6 +1651,7 @@ begin
|
|||||||
//APage.ChangeBounds(cRect.Left,cRect.Top,cRect.Right,cRect.Bottom);
|
//APage.ChangeBounds(cRect.Left,cRect.Top,cRect.Right,cRect.Bottom);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
FPagesBar.OrderButtons;
|
||||||
//DebugLn(DbgSName(APage.Parent),' a');
|
//DebugLn(DbgSName(APage.Parent),' a');
|
||||||
{$IFDEF DEBUGTAB}
|
{$IFDEF DEBUGTAB}
|
||||||
DebugLn(['TGradTabControl.InsertPage END ',dbgsName(Self),' Index=',
|
DebugLn(['TGradTabControl.InsertPage END ',dbgsName(Self),' Index=',
|
||||||
@ -1660,8 +1800,40 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
FPagesBar.Align:=alClient;
|
||||||
FPagesBar.TabPosition:=Value;
|
FPagesBar.TabPosition:=Value;
|
||||||
|
|
||||||
|
case Value of
|
||||||
|
tpTop: begin
|
||||||
|
FLeftButton.Align:=alLeft;
|
||||||
|
FLeftButton.RotateDirection:=rdNormal;
|
||||||
|
FRightButton.Align:=alRight;
|
||||||
|
FRightButton.RotateDirection:=rdNormal;
|
||||||
|
//FBar.Align:=alTop;
|
||||||
|
end;
|
||||||
|
tpLeft:begin
|
||||||
|
FLeftButton.Align:=alTop;
|
||||||
|
FLeftButton.RotateDirection:=rdRight;
|
||||||
|
FRightButton.Align:=alBottom;
|
||||||
|
FRightButton.RotateDirection:=rdRight;
|
||||||
|
//FBar.Align:=alLeft;
|
||||||
|
end;
|
||||||
|
tpBottom:begin
|
||||||
|
FLeftButton.Align:=alLeft;
|
||||||
|
FLeftButton.RotateDirection:=rdNormal;
|
||||||
|
FRightButton.Align:=alRight;
|
||||||
|
FRightButton.RotateDirection:=rdNormal;
|
||||||
|
//FBar.Align := alBottom;
|
||||||
|
end;
|
||||||
|
tpRight:begin
|
||||||
|
FLeftButton.Align:=alTop;
|
||||||
|
FLeftButton.RotateDirection:=rdRight;
|
||||||
|
FRightButton.Align:=alBottom;
|
||||||
|
FRightButton.RotateDirection:=rdRight;
|
||||||
|
//FBar.Align:=alRight;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{$IFDEF DEBUGTAB}
|
{$IFDEF DEBUGTAB}
|
||||||
DebugLn('After');
|
DebugLn('After');
|
||||||
DebugLn('FBar Left %d Top %d Height %d Width %d',[ FBar.Left, Fbar.Top, FBar.Height, FBar.Width]);
|
DebugLn('FBar Left %d Top %d Height %d Width %d',[ FBar.Left, Fbar.Top, FBar.Height, FBar.Width]);
|
||||||
@ -1904,5 +2076,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
{$I ugradtabcontrol.lrs}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -83,6 +83,8 @@ type
|
|||||||
procedure SetText(const Value: String);
|
procedure SetText(const Value: String);
|
||||||
procedure UpdateText;
|
procedure UpdateText;
|
||||||
protected
|
protected
|
||||||
|
function GetWidth: Integer; override;
|
||||||
|
function GetHeight: Integer; override;
|
||||||
public
|
public
|
||||||
constructor Create; override;
|
constructor Create; override;
|
||||||
property Font: TFont write SetFont;
|
property Font: TFont write SetFont;
|
||||||
@ -100,12 +102,17 @@ function CreateRotatedBitmap(SrcImage: TRasterImage; Direction: TRotateDirection
|
|||||||
var
|
var
|
||||||
px, py, nx, ny : Integer;
|
px, py, nx, ny : Integer;
|
||||||
RotateImg, NormalImg: TLazIntfImage;
|
RotateImg, NormalImg: TLazIntfImage;
|
||||||
ImageHandle, MaskHandle: HBITMAP;
|
|
||||||
begin
|
begin
|
||||||
NormalImg := SrcImage.CreateIntfImage;
|
Result := TBitmap.Create;
|
||||||
|
if (SrcImage.Width = 0) or (SrcImage.Height = 0) then
|
||||||
|
begin
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
NormalImg := SrcImage.CreateIntfImage;
|
||||||
RotateImg := TLazIntfImage.Create(NormalImg.Height, NormalImg.Width);
|
RotateImg := TLazIntfImage.Create(NormalImg.Height, NormalImg.Width);
|
||||||
RotateImg.DataDescription := GetDescriptionFromDevice(0, NormalImg.Height, NormalImg.Width);
|
RotateImg.DataDescription := NormalImg.DataDescription;
|
||||||
|
RotateImg.SetSize(NormalImg.Height, NormalImg.Width);
|
||||||
|
|
||||||
for px := 0 to NormalImg.Width - 1 do
|
for px := 0 to NormalImg.Width - 1 do
|
||||||
for py := 0 to NormalImg.Height - 1 do
|
for py := 0 to NormalImg.Height - 1 do
|
||||||
@ -119,22 +126,14 @@ begin
|
|||||||
ny := RotateImg.Height - 1 - px;
|
ny := RotateImg.Height - 1 - px;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
RotateImg.Colors[nx, ny] := NormalImg.Colors[px, py];
|
RotateImg.Colors[nx,ny] := NormalImg.Colors[px,py];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := TBitmap.Create;
|
Result.LoadFromIntfImage(RotateImg);
|
||||||
|
|
||||||
//todo: Set mask manually and than create the mask handle here
|
if SrcImage.Masked then
|
||||||
//LoadFromIntfImage always create a mask leading to wrong display
|
|
||||||
RotateImg.CreateBitmaps(ImageHandle, MaskHandle, True);
|
|
||||||
Result.SetHandles(ImageHandle, MaskHandle);
|
|
||||||
if SrcImage.MaskHandleAllocated then
|
|
||||||
begin
|
|
||||||
//Calling TransparentMode and than TransparentColor creates the mask twice
|
|
||||||
//Set TransparentColor and call Mask
|
|
||||||
Result.TransparentColor := SrcImage.TransparentColor;
|
Result.TransparentColor := SrcImage.TransparentColor;
|
||||||
Result.Mask(SrcImage.TransparentColor);
|
Result.Transparent := SrcImage.Transparent;
|
||||||
end;
|
|
||||||
|
|
||||||
RotateImg.Free;
|
RotateImg.Free;
|
||||||
NormalImg.Free;
|
NormalImg.Free;
|
||||||
@ -189,7 +188,6 @@ begin
|
|||||||
FRotatedBitmap := CreateRotatedBitmap(FNormalBitmap, FDirection);
|
FRotatedBitmap := CreateRotatedBitmap(FNormalBitmap, FDirection);
|
||||||
FActiveBitmap := FRotatedBitmap;
|
FActiveBitmap := FRotatedBitmap;
|
||||||
end;
|
end;
|
||||||
FActiveBitmap.Transparent := FTransparent;
|
|
||||||
FActiveBitmapNeedsUpdate := False;
|
FActiveBitmapNeedsUpdate := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -301,8 +299,8 @@ end;
|
|||||||
procedure TRotatedText.UpdateText;
|
procedure TRotatedText.UpdateText;
|
||||||
var
|
var
|
||||||
TextSize : TSize;
|
TextSize : TSize;
|
||||||
|
TransColor: TColor;
|
||||||
begin
|
begin
|
||||||
//todo: handle font
|
|
||||||
with FNormalBitmap, Canvas do
|
with FNormalBitmap, Canvas do
|
||||||
begin
|
begin
|
||||||
TextSize := TextExtent(FText);
|
TextSize := TextExtent(FText);
|
||||||
@ -314,14 +312,30 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
SetSize(TextSize.cx, TextSize.cy);
|
SetSize(TextSize.cx, TextSize.cy);
|
||||||
if Font.Color <> clFuchsia then
|
if Font.Color <> clFuchsia then
|
||||||
Brush.Color := clFuchsia
|
TransColor := clFuchsia
|
||||||
else
|
else
|
||||||
Brush.Color := clWhite;
|
TransColor := clWhite;
|
||||||
|
Brush.Color := TransColor;
|
||||||
FillRect(0, 0, FNormalBitmap.Width, FNormalBitmap.Height);
|
FillRect(0, 0, FNormalBitmap.Width, FNormalBitmap.Height);
|
||||||
TextOut(0, 0, FText);
|
TextOut(0, 0, FText);
|
||||||
Mask(Brush.Color);
|
Mask(TransColor);
|
||||||
end;
|
end;
|
||||||
//FActiveBitmapNeedsUpdate := True;
|
end;
|
||||||
|
|
||||||
|
function TRotatedText.GetWidth: Integer;
|
||||||
|
begin
|
||||||
|
if FText <> '' then
|
||||||
|
Result := inherited GetWidth
|
||||||
|
else
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRotatedText.GetHeight: Integer;
|
||||||
|
begin
|
||||||
|
if FText <> '' then
|
||||||
|
Result := inherited GetHeight
|
||||||
|
else
|
||||||
|
Result := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TRotatedText.Create;
|
constructor TRotatedText.Create;
|
||||||
|
Reference in New Issue
Block a user