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