diff --git a/components/gradcontrols/examples/Forms/unit1.lfm b/components/gradcontrols/examples/Forms/unit1.lfm
index 83ae52fde..b6d7b010a 100644
--- a/components/gradcontrols/examples/Forms/unit1.lfm
+++ b/components/gradcontrols/examples/Forms/unit1.lfm
@@ -1,7 +1,7 @@
object Form1: TForm1
- Left = 243
+ Left = 253
Height = 492
- Top = 105
+ Top = 145
Width = 884
Caption = 'TGradTabControl-Testsuite'
ClientHeight = 492
@@ -43,12 +43,13 @@ object Form1: TForm1
ShowLeftTopScrollButton = False
ShowRightBottomScrollButton = False
Images = ImageList1
+ CustomDraw = False
object GradTabPage3: TGradTabPage
Left = 2
Height = 466
Top = 22
Width = 640
- PageIndex = 2
+ PageIndex = 1
Caption = 'GradTabPage3'
TabColor = clBlue
TabTextAlignment = taLeftJustify
@@ -93,10 +94,10 @@ object Form1: TForm1
end
object GradTabPage2: TGradTabPage
Left = 2
- Height = 466
+ Height = 488
Top = 22
- Width = 640
- PageIndex = 1
+ Width = 642
+ PageIndex = 2
Caption = 'GradTabPage2'
ShowCloseButton = True
TabColor = clBlue
diff --git a/components/gradcontrols/examples/Forms/unit1.lrs b/components/gradcontrols/examples/Forms/unit1.lrs
index 15709adee..386e0b9d3 100644
--- a/components/gradcontrols/examples/Forms/unit1.lrs
+++ b/components/gradcontrols/examples/Forms/unit1.lrs
@@ -1,40 +1,90 @@
-{ This is an automatically generated lazarus resource file }
+{ Das ist eine automatisch erzeugte Lazarus-Ressourcendatei }
LazarusResources.Add('TForm1','FORMDATA',[
- 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#243#0#6'Height'#3#236#1#3'Top'#2'i'#5'Wid'
- +'th'#3't'#3#7'Caption'#6#25'TGradTabControl-Testsuite'#12'ClientHeight'#3#236
- +#1#11'ClientWidth'#3't'#3#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'For'
- +'mDestroy'#10'LCLVersion'#6#6'0.9.27'#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'He'
- +'ight'#3#236#1#3'Top'#2#0#5'Width'#3#134#2#5'Align'#7#8'alClient'#7'Caption'
- +#6#6'Panel1'#12'ClientHeight'#3#236#1#11'ClientWidth'#3#134#2#8'TabOrder'#2#0
- +#0#15'TGradTabControl'#15'GradTabControl1'#4'Left'#2#1#6'Height'#3#234#1#3'T'
- +'op'#2#1#5'Width'#3#132#2#5'Align'#7#8'alClient'#10'ActivePage'#7#12'GradTab'
- +'Page1'#20'OnTabButtonMouseDown'#7'!GradTabControl1TabButtonMouseDown'#18'On'
- +'TabButtonMouseUp'#7#31'GradTabControl1TabButtonMouseUp'#20'OnTabButtonMouse'
- +'Move'#7'!GradTabControl1TabButtonMouseMove'#21'OnTabCloseButtonClick'#7'"Gr'
- +'adTabControl1TabCloseButtonClick'#10'OnDragDrop'#7#23'GradTabControl1DragDr'
- +'op'#10'OnDragOver'#7#23'GradTabControl1DragOver'#11'OnMouseDown'#7#24'GradT'
- +'abControl1MouseDown'#14'OnMouseWheelUp'#7#27'GradTabControl1MouseWheelUp'#16
- +'OnMouseWheelDown'#7#29'GradTabControl1MouseWheelDown'#9'PageIndex'#2#0#9'Ta'
- +'bHeight'#2#20#8'LongTabs'#8#9'LongWidth'#2'e'#13'OnPageChanged'#7#26'GradTa'
- +'bControl1PageChanged'#23'ShowLeftTopScrollButton'#8#27'ShowRightBottomScrol'
- +'lButton'#8#6'Images'#7#10'ImageList1'#0#12'TGradTabPage'#12'GradTabPage3'#4
- +'Left'#2#2#6'Height'#3#210#1#3'Top'#2#22#5'Width'#3#128#2#9'PageIndex'#2#2#7
- +'Caption'#6#12'GradTabPage3'#8'TabColor'#7#6'clBlue'#16'TabTextAlignment'#7
- +#13'taLeftJustify'#13'TabGlyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0
- +'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0
- +#0#0#0#0#0#0#0#0#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198#220'-k'#194
- +#225#153'_'#188#221#184'U'#180#212#210'L'#169#202#232'C'#160#192#234'>'#156
- +#188#213'B'#158#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0'#'#0'fNI'
- +#130'Y=7pmB7pa'#134#150'Dp'#208#242#246'_'#199#235#255'S'#187#223#255'G'#176
+ 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#253#0#6'Height'#3#236#1#3'Top'#3#145#0#5
+ +'Width'#3't'#3#7'Caption'#6#25'TGradTabControl-Testsuite'#12'ClientHeight'#3
+ +#236#1#11'ClientWidth'#3't'#3#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11
+ +'FormDestroy'#10'LCLVersion'#6#6'0.9.27'#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6
+ +'Height'#3#236#1#3'Top'#2#0#5'Width'#3#134#2#5'Align'#7#8'alClient'#7'Captio'
+ +'n'#6#6'Panel1'#12'ClientHeight'#3#236#1#11'ClientWidth'#3#134#2#8'TabOrder'
+ +#2#0#0#15'TGradTabControl'#15'GradTabControl1'#4'Left'#2#1#6'Height'#3#234#1
+ +#3'Top'#2#1#5'Width'#3#132#2#5'Align'#7#8'alClient'#10'ActivePage'#7#12'Grad'
+ +'TabPage1'#20'OnTabButtonMouseDown'#7'!GradTabControl1TabButtonMouseDown'#18
+ +'OnTabButtonMouseUp'#7#31'GradTabControl1TabButtonMouseUp'#20'OnTabButtonMou'
+ +'seMove'#7'!GradTabControl1TabButtonMouseMove'#21'OnTabCloseButtonClick'#7'"'
+ +'GradTabControl1TabCloseButtonClick'#10'OnDragDrop'#7#23'GradTabControl1Drag'
+ +'Drop'#10'OnDragOver'#7#23'GradTabControl1DragOver'#11'OnMouseDown'#7#24'Gra'
+ +'dTabControl1MouseDown'#14'OnMouseWheelUp'#7#27'GradTabControl1MouseWheelUp'
+ +#16'OnMouseWheelDown'#7#29'GradTabControl1MouseWheelDown'#9'PageIndex'#2#0#9
+ +'TabHeight'#2#20#8'LongTabs'#8#9'LongWidth'#2'e'#13'OnPageChanged'#7#26'Grad'
+ +'TabControl1PageChanged'#23'ShowLeftTopScrollButton'#8#27'ShowRightBottomScr'
+ +'ollButton'#8#6'Images'#7#10'ImageList1'#10'CustomDraw'#8#0#12'TGradTabPage'
+ +#12'GradTabPage3'#4'Left'#2#2#6'Height'#3#210#1#3'Top'#2#22#5'Width'#3#128#2
+ +#9'PageIndex'#2#1#7'Caption'#6#12'GradTabPage3'#8'TabColor'#7#6'clBlue'#16'T'
+ +'abTextAlignment'#7#13'taLeftJustify'#13'TabGlyph.Data'#10':'#4#0#0'6'#4#0#0
+ +'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4
+ +#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18
+ +#134#198#220'-k'#194#225#153'_'#188#221#184'U'#180#212#210'L'#169#202#232'C'
+ +#160#192#234'>'#156#188#213'B'#158#191#188'P'#168#199#159'y'#185#208';'#0#0
+ +'#'#0#0#0'#'#0'fNI'#130'Y=7pmB7pa'#134#150'Dp'#208#242#246'_'#199#235#255'S'
+ +#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'
+ +#144#181#255'4'#156#192#255'U'#183#217#250#133#201#225'O'#0#0'#'#0'Q<6&nKB'
+ +#142'L-&kv'#187#210'ok'#210#245#255']'#186#213#255'Q'#175#205#255'R'#172#200
+ +#255'J'#168#199#255'E'#163#195#255'F'#159#188#255'='#153#184#255'@'#158#187
+ +#255'O'#181#217#255'z'#205#235#130#0#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193
+ +'m^'#187#219#252'^'#193#227#255'Z'#187#220#255'G'#176#212#255'<'#164#200#255
+ +'0'#153#189#255'('#144#180#255'3'#149#182#255'B'#162#196#255'T'#177#209#253
+ +'~'#192#210#136#0#0'#'#0#0#0'#'#0'iH>'#131'_90'#142#133#204#230'Zk'#210#246
+ +#255'_'#199#235#255'S'#187#223#255'G'#176#212#255'D'#164#195#255':'#154#183
+ +#255'('#144#180#255')'#144#181#255'4'#156#192#255'N'#182#218#255'}'#204#230
+ +'x'#0#0'#'#0#0#0#0#7'^?8m_8.it'#183#205'rh'#197#226#255'U'#176#205#255'N'#175
+ +#206#255'J'#171#205#255'C'#169#204#255'='#163#199#255'='#160#193#255'@'#161
+ +#193#255'I'#164#195#255'Q'#175#205#255'z'#204#233#130#0#0'#'#0#0#0#0#4'^A7'
+ +#138'e>3w'#133#184#196'Qi'#196#229#252'`'#199#235#255'S'#187#223#255'G'#176
+#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156
- +#192#255'U'#183#217#250#133#201#225'O'#0#0'#'#0'Q<6&nKB'#142'L-&kv'#187#210
- +'ok'#210#245#255']'#186#213#255'Q'#175#205#255'R'#172#200#255'J'#168#199#255
- +'E'#163#195#255'F'#159#188#255'='#153#184#255'@'#158#187#255'O'#181#217#255
- +'z'#205#235#130#0#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252'^'
- +#193#227#255'Z'#187#220#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('
- +#144#180#255'3'#149#182#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0#0
- +'#'#0#0#0'#'#0'iH>'#131'_90'#142#133#204#230'Zk'#210#246#255'_'#199#235#255
+ +#192#255'W'#181#213#253#135#187#204'w'#0#0'#'#0#0#0'#'#0',#'#26#29'Q2)'#138
+ +'p'#177#198'qj'#210#246#255'`'#199#234#255'\'#183#211#255'O'#171#199#255'B'
+ +#161#192#255';'#155#185#255'9'#149#176#255'8'#146#175#255'6'#156#191#255'N'
+ +#182#218#255'{'#206#233#129#0#0'#'#0#0#0#0#4'pND'#150'lB7'#154'z'#187#206'q]'
+ +#184#210#255'P'#178#212#255'I'#179#216#255'D'#176#212#255'A'#168#205#255'9'
+ +#160#196#255'4'#157#194#255'5'#160#198#255'@'#165#198#255'O'#172#200#255'~'
+ +#202#228#134#0#0'#'#0#0#0#0#5'bD;'#177'P0('#159't'#157#168'Sl'#205#238#251'_'
+ +#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('
+ +#144#180#255')'#144#181#255'4'#156#192#255'U'#182#216#253#130#192#205'l'#0#0
+ +'#'#0#0#0'#'#0'dF='#150'G,$]{'#196#221'lj'#210#246#255'`'#189#217#255'O'#176
+ +#205#255'J'#170#200#255'L'#168#196#255'I'#164#193#255'='#154#184#255'6'#151
+ +#182#255'@'#157#187#255'N'#182#218#255'z'#204#233#130#0#0'#'#0'dNF'#128'hH?'
+ +#142'U5-~'#132#197#217'j['#186#217#252'Y'#190#225#255'Y'#185#219#255'P'#177
+ +#211#255'<'#164#200#255'0'#153#189#255'1'#147#181#255'9'#153#187#255'@'#164
+ +#199#255'P'#175#207#253'|'#195#215#135#0#0'#'#0'kRJ|pLE'#137'\9-l'#195#218
+ +'Ol'#210#245#254'_'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255
+ +'0'#153#189#255'('#144#180#255')'#145#181#255'4'#156#192#255'O'#182#218#255
+ +#130#205#229'o'#0#0'#'#0#0#0#0#6'6"'#27'&M.(t}'#198#223'lk'#204#235#255'I'
+ +#175#207#255';'#166#201#255'4'#162#197#255'.'#158#195#255'-'#157#194#255'-'
+ +#156#191#255'/'#155#190#255'6'#158#192#255'P'#178#210#255'y'#204#234#130#0#0
+ +'#'#0#0#0#0#9'bB:'#188'R2('#164'z'#164#179'U7'#162#195#243#24#159#207#255#24
+ +#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24
+ +#159#207#255#24#159#207#255'.'#159#196#247'{'#184#200'i'#0#0'#'#0#0#0'#'#0'{'
+ ,'SIfg@4'#148#26#0#0#10'q'#161#162'$:'#159#189#158'1'#159#193#188'.'#159#195
+ +#211'+'#158#196#234'+'#159#195#236'-'#159#195#214'0'#159#195#191'7'#160#192
+ +#164'^'#161#173'1'#0#0'#'#0#0#0'#'#0#12'TabShowGlyph'#9#15'TabButtonLayout'#7
+ +#11'blGlyphLeft'#0#0#12'TGradTabPage'#12'GradTabPage2'#4'Left'#2#2#6'Height'
+ +#3#232#1#3'Top'#2#22#5'Width'#3#130#2#9'PageIndex'#2#2#7'Caption'#6#12'GradT'
+ +'abPage2'#15'ShowCloseButton'#9#8'TabColor'#7#6'clBlue'#16'TabTextAlignment'
+ +#7#13'taLeftJustify'#13'TabGlyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0
+ +#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0
+ +#0#0#0#0#0#0#0#0#0#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198#220'-k'
+ +#194#225#153'_'#188#221#184'U'#180#212#210'L'#169#202#232'C'#160#192#234'>'
+ +#156#188#213'B'#158#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0'#'#0'f'
+ +'NI'#130'Y=7pmB7pa'#134#150'Dp'#208#242#246'_'#199#235#255'S'#187#223#255'G'
+ +#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'
+ +#156#192#255'U'#183#217#250#133#201#225'O'#0#0'#'#0'Q<6&nKB'#142'L-&kv'#187
+ +#210'ok'#210#245#255']'#186#213#255'Q'#175#205#255'R'#172#200#255'J'#168#199
+ +#255'E'#163#195#255'F'#159#188#255'='#153#184#255'@'#158#187#255'O'#181#217
+ +#255'z'#205#235#130#0#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252
+ +'^'#193#227#255'Z'#187#220#255'G'#176#212#255'<'#164#200#255'0'#153#189#255
+ +'('#144#180#255'3'#149#182#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0
+ +#0'#'#0#0#0'#'#0'iH>'#131'_90'#142#133#204#230'Zk'#210#246#255'_'#199#235#255
+'S'#187#223#255'G'#176#212#255'D'#164#195#255':'#154#183#255'('#144#180#255
+')'#144#181#255'4'#156#192#255'N'#182#218#255'}'#204#230'x'#0#0'#'#0#0#0#0#7
+'^?8m_8.it'#183#205'rh'#197#226#255'U'#176#205#255'N'#175#206#255'J'#171#205
@@ -65,223 +115,174 @@ LazarusResources.Add('TForm1','FORMDATA',[
+#188'R2('#164'z'#164#179'U7'#162#195#243#24#159#207#255#24#159#207#255#24#159
+#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159
+#207#255'.'#159#196#247'{'#184#200'i'#0#0'#'#0#0#0'#'#0'{SIfg@4'#148#26#0#0
- ,#10'q'#161#162'$:'#159#189#158'1'#159#193#188'.'#159#195#211'+'#158#196#234
+ +#10'q'#161#162'$:'#159#189#158'1'#159#193#188'.'#159#195#211'+'#158#196#234
+'+'#159#195#236'-'#159#195#214'0'#159#195#191'7'#160#192#164'^'#161#173'1'#0
+#0'#'#0#0#0'#'#0#12'TabShowGlyph'#9#15'TabButtonLayout'#7#11'blGlyphLeft'#0#0
- +#12'TGradTabPage'#12'GradTabPage2'#4'Left'#2#2#6'Height'#3#210#1#3'Top'#2#22
- +#5'Width'#3#128#2#9'PageIndex'#2#1#7'Caption'#6#12'GradTabPage2'#15'ShowClos'
- +'eButton'#9#8'TabColor'#7#6'clBlue'#16'TabTextAlignment'#7#13'taLeftJustify'
- +#13'TabGlyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0
- +#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0
- +'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198#220'-k'#194#225#153'_'#188
- +#221#184'U'#180#212#210'L'#169#202#232'C'#160#192#234'>'#156#188#213'B'#158
- +#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0'#'#0'fNI'#130'Y=7pmB7pa'
- +#134#150'Dp'#208#242#246'_'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164
- +#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255'U'#183
- +#217#250#133#201#225'O'#0#0'#'#0'Q<6&nKB'#142'L-&kv'#187#210'ok'#210#245#255
- +']'#186#213#255'Q'#175#205#255'R'#172#200#255'J'#168#199#255'E'#163#195#255
- +'F'#159#188#255'='#153#184#255'@'#158#187#255'O'#181#217#255'z'#205#235#130#0
- +#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252'^'#193#227#255'Z'#187
- +#220#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255'3'#149
- +#182#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0#0'#'#0#0#0'#'#0'iH>'
- +#131'_90'#142#133#204#230'Zk'#210#246#255'_'#199#235#255'S'#187#223#255'G'
- +#176#212#255'D'#164#195#255':'#154#183#255'('#144#180#255')'#144#181#255'4'
- +#156#192#255'N'#182#218#255'}'#204#230'x'#0#0'#'#0#0#0#0#7'^?8m_8.it'#183#205
- +'rh'#197#226#255'U'#176#205#255'N'#175#206#255'J'#171#205#255'C'#169#204#255
- +'='#163#199#255'='#160#193#255'@'#161#193#255'I'#164#195#255'Q'#175#205#255
- +'z'#204#233#130#0#0'#'#0#0#0#0#4'^A7'#138'e>3w'#133#184#196'Qi'#196#229#252
- +'`'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255
- +'('#144#180#255')'#144#181#255'4'#156#192#255'W'#181#213#253#135#187#204'w'#0
- +#0'#'#0#0#0'#'#0',#'#26#29'Q2)'#138'p'#177#198'qj'#210#246#255'`'#199#234#255
- +'\'#183#211#255'O'#171#199#255'B'#161#192#255';'#155#185#255'9'#149#176#255
- +'8'#146#175#255'6'#156#191#255'N'#182#218#255'{'#206#233#129#0#0'#'#0#0#0#0#4
- +'pND'#150'lB7'#154'z'#187#206'q]'#184#210#255'P'#178#212#255'I'#179#216#255
- +'D'#176#212#255'A'#168#205#255'9'#160#196#255'4'#157#194#255'5'#160#198#255
- +'@'#165#198#255'O'#172#200#255'~'#202#228#134#0#0'#'#0#0#0#0#5'bD;'#177'P0('
- +#159't'#157#168'Sl'#205#238#251'_'#199#235#255'S'#187#223#255'G'#176#212#255
- +'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255
- +'U'#182#216#253#130#192#205'l'#0#0'#'#0#0#0'#'#0'dF='#150'G,$]{'#196#221'lj'
- +#210#246#255'`'#189#217#255'O'#176#205#255'J'#170#200#255'L'#168#196#255'I'
- +#164#193#255'='#154#184#255'6'#151#182#255'@'#157#187#255'N'#182#218#255'z'
- +#204#233#130#0#0'#'#0'dNF'#128'hH?'#142'U5-~'#132#197#217'j['#186#217#252'Y'
- +#190#225#255'Y'#185#219#255'P'#177#211#255'<'#164#200#255'0'#153#189#255'1'
- +#147#181#255'9'#153#187#255'@'#164#199#255'P'#175#207#253'|'#195#215#135#0#0
- +'#'#0'kRJ|pLE'#137'\9-l'#195#218'Ol'#210#245#254'_'#199#235#255'S'#187#223
- +#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#145#181
- +#255'4'#156#192#255'O'#182#218#255#130#205#229'o'#0#0'#'#0#0#0#0#6'6"'#27'&M'
- +'.(t}'#198#223'lk'#204#235#255'I'#175#207#255';'#166#201#255'4'#162#197#255
- +'.'#158#195#255'-'#157#194#255'-'#156#191#255'/'#155#190#255'6'#158#192#255
- +'P'#178#210#255'y'#204#234#130#0#0'#'#0#0#0#0#9'bB:'#188'R2('#164'z'#164#179
- +'U7'#162#195#243#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255
- +#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255'.'#159#196#247
- +'{'#184#200'i'#0#0'#'#0#0#0'#'#0'{SIfg@4'#148#26#0#0#10'q'#161#162'$:'#159
- +#189#158'1'#159#193#188'.'#159#195#211'+'#158#196#234'+'#159#195#236'-'#159
- +#195#214'0'#159#195#191'7'#160#192#164'^'#161#173'1'#0#0'#'#0#0#0'#'#0#12'Ta'
- +'bShowGlyph'#9#15'TabButtonLayout'#7#11'blGlyphLeft'#0#0#12'TGradTabPage'#12
- +'GradTabPage1'#4'Left'#2#2#6'Height'#3#210#1#3'Top'#2#22#5'Width'#3#128#2#9
- +'PageIndex'#2#0#7'Caption'#6#9'Some Memo'#15'ShowCloseButton'#9#5'Color'#7#10
- +'clGrayText'#8'TabColor'#7#7'clGreen'#16'TabTextAlignment'#7#13'taLeftJustif'
- +'y'#13'TabGlyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0
- +#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0
- +#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198#220'-k'#194#225#153'_'#188
- +#221#184'U'#180#212#210'L'#169#202#232'C'#160#192#234'>'#156#188#213'B'#158
- +#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0'#'#0'fNI'#130'Y=7pmB7pa'
- +#134#150'Dp'#208#242#246'_'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164
- +#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255'U'#183
- +#217#250#133#201#225'O'#0#0'#'#0'Q<6&nKB'#142'L-&kv'#187#210'ok'#210#245#255
- ,']'#186#213#255'Q'#175#205#255'R'#172#200#255'J'#168#199#255'E'#163#195#255
- +'F'#159#188#255'='#153#184#255'@'#158#187#255'O'#181#217#255'z'#205#235#130#0
- +#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252'^'#193#227#255'Z'#187
- +#220#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255'3'#149
- +#182#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0#0'#'#0#0#0'#'#0'iH>'
- +#131'_90'#142#133#204#230'Zk'#210#246#255'_'#199#235#255'S'#187#223#255'G'
- +#176#212#255'D'#164#195#255':'#154#183#255'('#144#180#255')'#144#181#255'4'
- +#156#192#255'N'#182#218#255'}'#204#230'x'#0#0'#'#0#0#0#0#7'^?8m_8.it'#183#205
- +'rh'#197#226#255'U'#176#205#255'N'#175#206#255'J'#171#205#255'C'#169#204#255
- +'='#163#199#255'='#160#193#255'@'#161#193#255'I'#164#195#255'Q'#175#205#255
- +'z'#204#233#130#0#0'#'#0#0#0#0#4'^A7'#138'e>3w'#133#184#196'Qi'#196#229#252
- +'`'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255
- +'('#144#180#255')'#144#181#255'4'#156#192#255'W'#181#213#253#135#187#204'w'#0
- +#0'#'#0#0#0'#'#0',#'#26#29'Q2)'#138'p'#177#198'qj'#210#246#255'`'#199#234#255
- +'\'#183#211#255'O'#171#199#255'B'#161#192#255';'#155#185#255'9'#149#176#255
- +'8'#146#175#255'6'#156#191#255'N'#182#218#255'{'#206#233#129#0#0'#'#0#0#0#0#4
- +'pND'#150'lB7'#154'z'#187#206'q]'#184#210#255'P'#178#212#255'I'#179#216#255
- +'D'#176#212#255'A'#168#205#255'9'#160#196#255'4'#157#194#255'5'#160#198#255
- +'@'#165#198#255'O'#172#200#255'~'#202#228#134#0#0'#'#0#0#0#0#5'bD;'#177'P0('
- +#159't'#157#168'Sl'#205#238#251'_'#199#235#255'S'#187#223#255'G'#176#212#255
- +'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255
- +'U'#182#216#253#130#192#205'l'#0#0'#'#0#0#0'#'#0'dF='#150'G,$]{'#196#221'lj'
- +#210#246#255'`'#189#217#255'O'#176#205#255'J'#170#200#255'L'#168#196#255'I'
- +#164#193#255'='#154#184#255'6'#151#182#255'@'#157#187#255'N'#182#218#255'z'
- +#204#233#130#0#0'#'#0'dNF'#128'hH?'#142'U5-~'#132#197#217'j['#186#217#252'Y'
- +#190#225#255'Y'#185#219#255'P'#177#211#255'<'#164#200#255'0'#153#189#255'1'
- +#147#181#255'9'#153#187#255'@'#164#199#255'P'#175#207#253'|'#195#215#135#0#0
- +'#'#0'kRJ|pLE'#137'\9-l'#195#218'Ol'#210#245#254'_'#199#235#255'S'#187#223
- +#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#145#181
- +#255'4'#156#192#255'O'#182#218#255#130#205#229'o'#0#0'#'#0#0#0#0#6'6"'#27'&M'
- +'.(t}'#198#223'lk'#204#235#255'I'#175#207#255';'#166#201#255'4'#162#197#255
- +'.'#158#195#255'-'#157#194#255'-'#156#191#255'/'#155#190#255'6'#158#192#255
- +'P'#178#210#255'y'#204#234#130#0#0'#'#0#0#0#0#9'bB:'#188'R2('#164'z'#164#179
- +'U7'#162#195#243#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255
- +#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255'.'#159#196#247
- +'{'#184#200'i'#0#0'#'#0#0#0'#'#0'{SIfg@4'#148#26#0#0#10'q'#161#162'$:'#159
- +#189#158'1'#159#193#188'.'#159#195#211'+'#158#196#234'+'#159#195#236'-'#159
- +#195#214'0'#159#195#191'7'#160#192#164'^'#161#173'1'#0#0'#'#0#0#0'#'#0#12'Ta'
- +'bShowGlyph'#9#15'TabButtonLayout'#7#11'blGlyphLeft'#0#5'TMemo'#5'Memo1'#4'L'
- +'eft'#3'8'#1#6'Height'#3#210#1#3'Top'#2#0#5'Width'#3'H'#1#5'Align'#7#7'alRig'
- +'ht'#13'Lines.Strings'#1#6#9'Some Memo'#6#7'alRight'#0#8'TabOrder'#2#0#0#0#0
- +#0#0#6'TPanel'#6'Panel2'#4'Left'#3#134#2#6'Height'#3#236#1#3'Top'#2#0#5'Widt'
- +'h'#3#238#0#5'Align'#7#7'alRight'#12'ClientHeight'#3#236#1#11'ClientWidth'#3
- +#238#0#8'TabOrder'#2#1#0#6'TLabel'#6'Label1'#4'Left'#2#16#6'Height'#2#16#3'T'
- +'op'#3#160#0#5'Width'#2'9'#7'Caption'#6#9'TabHeight'#11'ParentColor'#8#0#0#9
- +'TComboBox'#9'ComboBox1'#4'Left'#2#16#6'Height'#2#23#3'Top'#2#16#5'Width'#2
- +'d'#10'ItemHeight'#2#15#8'OnChange'#7#15'ComboBox1Change'#5'Style'#7#14'csDr'
- +'opDownList'#8'TabOrder'#2#0#0#0#11'TRadioGroup'#11'RadioGroup1'#4'Left'#3
- +#128#0#6'Height'#2'q'#3'Top'#2#16#5'Width'#2'd'#8'AutoFill'#9#7'Caption'#6#12
- +'Tab Position'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottom'
- +'Spacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResiz'
- +'e'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildS'
- +'izing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'
- +#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBot'
- +'tom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'_'#11'ClientWid'
- +'th'#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'RadioGroup1Click'#8'TabOrder'#2#1#0#0
- +#9'TCheckBox'#9'CheckBox1'#4'Left'#2#16#6'Height'#2#16#3'Top'#2'p'#5'Width'#2
- +'d'#8'AutoSize'#8#7'Caption'#6#9'Long Tabs'#7'OnClick'#7#14'CheckBox1Click'#8
- +'TabOrder'#2#2#0#0#11'TGradButton'#10'NewPageBtn'#4'Left'#2#16#6'Height'#2#25
- +#3'Top'#2'0'#5'Width'#2'd'#7'Caption'#6#8'New Page'#10'Font.Color'#7#7'clWhi'
- +'te'#7'OnClick'#7#15'NewPageBtnClick'#8'TabOrder'#2#3#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'
- +#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7'clWhite'
- +#10'ClickColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpac'
- +'ing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradButton'#9'DeleteBtn'
- +#4'Left'#2#16#6'Height'#2#25#3'Top'#2'P'#5'Width'#2'd'#7'Caption'#6#6'Delete'
- +#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#14'DeleteBtnClick'#8'TabOrder'#2#4
- +#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'
- +#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16
- +'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'Backgrou'
- +'ndColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackgr'
- +'oundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8
- +#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#9'TSpi'
- +'nEdit'#9'SpinEdit2'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#176#0#5'Width'#2'd'
- +#13'OnEditingDone'#7#20'SpinEdit2EditingDone'#8'TabOrder'#2#5#0#0#5'TEdit'#5
- +'Edit1'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#136#0#5'Width'#2'H'#8'TabOrder'
- +#2#6#4'Text'#6#5'Edit1'#0#0#11'TGradButton'#11'GradButton1'#4'Left'#2'Z'#6'H'
- +'eight'#2#19#3'Top'#3#136#0#5'Width'#2#26#7'Caption'#6#3'set'#10'Font.Color'
- +#7#7'clWhite'#7'OnClick'#7#16'GradButton1Click'#8'TabOrder'#2#7#7'TabStop'#9
- +#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'
- +#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'NormalBlendColo'
- +'r'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundColor'#7#9'cl'
- +'BtnFace'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackgroundColor'#7#7
- +'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22'AutoWidthB'
- +'orderSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TCheckGroup'#11
- +'CheckGroup1'#4'Left'#3#128#0#6'Height'#2'i'#3'Top'#3#143#0#5'Width'#2'd'#8
- +'AutoFill'#9#7'Caption'#6#14'Scroll Buttons'#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#13'Items'
- +'.Strings'#1#6#4'Auto'#6#7'LeftTop'#6#11'RightBottom'#0#7'OnClick'#7#16'Chec'
- +'kGroup1Click'#11'OnItemClick'#7#20'CheckGroup1ItemClick'#8'TabOrder'#2#8#4
- +'Data'#10#7#0#0#0#3#0#0#0#3#2#2#0#0#11'TRadioGroup'#11'RadioGroup2'#4'Left'#3
- +#130#0#6'Height'#2'i'#3'Top'#3#0#1#5'Width'#2'd'#8'AutoFill'#9#7'Caption'#6
- +#17'Tab Button Layout'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.T'
- +'opBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousCh'
- +'ildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
- +'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
- +'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
- +'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#2'W'#11'Cl'
- +'ientWidth'#2'`'#9'ItemIndex'#2#0#13'Items.Strings'#1#6#11'blGlyphLeft'#6#13
- +'blGlyphBottom'#6#12'blGlyphRight'#6#10'blGlyphTop'#0#7'OnClick'#7#16'RadioG'
- +'roup2Click'#8'TabOrder'#2#9#0#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#3
- +#222#2#3'top'#3#141#1#0#9'TMenuItem'#9'MenuItem1'#3'Tag'#4#152''#18#0#7'Cap'
- +'tion'#6#9'New Item1'#0#0#0#10'TImageList'#10'ImageList1'#4'left'#3#144#2#3
- +'top'#3#141#1#6'Bitmap'#10#14#4#0#0'Li'#1#0#0#0#16#0#0#0#16#0#0#0#0#0'#'#0'{'
- +'SIfg@4'#148#26#0#0#10'q'#161#162'$:'#159#189#158'1'#159#193#188'.'#159#195
- +#211'+'#158#196#234'+'#159#195#236'-'#159#195#214'0'#159#195#191'7'#160#192
- +#164'^'#161#173'1'#0#0'#'#0#0#0'#'#0#0#0#0#9'bB:'#188'R2('#164'z'#164#179'U7'
- +#162#195#243#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24
- +#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255'.'#159#196#247'{'
- +#184#200'i'#0#0'#'#0#0#0#0#6'6"'#27'&M.(t}'#198#223'lk'#204#235#255'I'#175
- +#207#255';'#166#201#255'4'#162#197#255'.'#158#195#255'-'#157#194#255'-'#156
- +#191#255'/'#155#190#255'6'#158#192#255'P'#178#210#255'y'#204#234#130#0#0'#'#0
- +'kRJ|pLE'#137'\9-l'#195#218'Ol'#210#245#254'_'#199#235#255'S'#187#223#255'G'
- +#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#145#181#255'4'
- +#156#192#255'O'#182#218#255#130#205#229'o'#0#0'#'#0'dNF'#128'hH?'#142'U5-~'
- +#132#197#217'j['#186#217#252'Y'#190#225#255'Y'#185#219#255'P'#177#211#255'<'
- +#164#200#255'0'#153#189#255'1'#147#181#255'9'#153#187#255'@'#164#199#255'P'
- +#175#207#253'|'#195#215#135#0#0'#'#0#0#0'#'#0'dF='#150'G,$]{'#196#221'lj'#210
- +#246#255'`'#189#217#255'O'#176#205#255'J'#170#200#255'L'#168#196#255'I'#164
- +#193#255'='#154#184#255'6'#151#182#255'@'#157#187#255'N'#182#218#255'z'#204
- +#233#130#0#0'#'#0#0#0#0#5'bD;'#177'P0('#159't'#157#168'Sl'#205#238#251'_'#199
- ,#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144
- +#180#255')'#144#181#255'4'#156#192#255'U'#182#216#253#130#192#205'l'#0#0'#'#0
- +#0#0#0#4'pND'#150'lB7'#154'z'#187#206'q]'#184#210#255'P'#178#212#255'I'#179
- +#216#255'D'#176#212#255'A'#168#205#255'9'#160#196#255'4'#157#194#255'5'#160
- +#198#255'@'#165#198#255'O'#172#200#255'~'#202#228#134#0#0'#'#0#0#0'#'#0',#'
- +#26#29'Q2)'#138'p'#177#198'qj'#210#246#255'`'#199#234#255'\'#183#211#255'O'
- +#171#199#255'B'#161#192#255';'#155#185#255'9'#149#176#255'8'#146#175#255'6'
- +#156#191#255'N'#182#218#255'{'#206#233#129#0#0'#'#0#0#0#0#4'^A7'#138'e>3w'
- +#133#184#196'Qi'#196#229#252'`'#199#235#255'S'#187#223#255'G'#176#212#255'<'
- +#164#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255'W'
- +#181#213#253#135#187#204'w'#0#0'#'#0#0#0#0#7'^?8m_8.it'#183#205'rh'#197#226
- +#255'U'#176#205#255'N'#175#206#255'J'#171#205#255'C'#169#204#255'='#163#199
- +#255'='#160#193#255'@'#161#193#255'I'#164#195#255'Q'#175#205#255'z'#204#233
- +#130#0#0'#'#0#0#0'#'#0'iH>'#131'_90'#142#133#204#230'Zk'#210#246#255'_'#199
- +#235#255'S'#187#223#255'G'#176#212#255'D'#164#195#255':'#154#183#255'('#144
- +#180#255')'#144#181#255'4'#156#192#255'N'#182#218#255'}'#204#230'x'#0#0'#'#0
- +#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252'^'#193#227#255'Z'#187#220
- +#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255'3'#149#182
- +#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0#0'#'#0'Q<6&nKB'#142'L-&k'
- +'v'#187#210'ok'#210#245#255']'#186#213#255'Q'#175#205#255'R'#172#200#255'J'
- +#168#199#255'E'#163#195#255'F'#159#188#255'='#153#184#255'@'#158#187#255'O'
- +#181#217#255'z'#205#235#130#0#0'#'#0'fNI'#130'Y=7pmB7pa'#134#150'Dp'#208#242
- +#246'_'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189
- +#255'('#144#180#255')'#144#181#255'4'#156#192#255'U'#183#217#250#133#201#225
- +'O'#0#0'#'#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198#220'-k'#194#225
- +#153'_'#188#221#184'U'#180#212#210'L'#169#202#232'C'#160#192#234'>'#156#188
- +#213'B'#158#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0'#'#0#0#0#0
+ +#12'TGradTabPage'#12'GradTabPage1'#4'Left'#2#2#6'Height'#3#210#1#3'Top'#2#22
+ +#5'Width'#3#128#2#9'PageIndex'#2#0#7'Caption'#6#9'Some Memo'#15'ShowCloseBut'
+ +'ton'#9#5'Color'#7#10'clGrayText'#8'TabColor'#7#7'clGreen'#16'TabTextAlignme'
+ +'nt'#7#13'taLeftJustify'#13'TabGlyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0
+ +#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0
+ +'d'#0#0#0#0#0#0#0#0#0#0#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198#220
+ +'-k'#194#225#153'_'#188#221#184'U'#180#212#210'L'#169#202#232'C'#160#192#234
+ +'>'#156#188#213'B'#158#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0'#'#0
+ +'fNI'#130'Y=7pmB7pa'#134#150'Dp'#208#242#246'_'#199#235#255'S'#187#223#255'G'
+ +#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'
+ +#156#192#255'U'#183#217#250#133#201#225'O'#0#0'#'#0'Q<6&nKB'#142'L-&kv'#187
+ ,#210'ok'#210#245#255']'#186#213#255'Q'#175#205#255'R'#172#200#255'J'#168#199
+ +#255'E'#163#195#255'F'#159#188#255'='#153#184#255'@'#158#187#255'O'#181#217
+ +#255'z'#205#235#130#0#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252
+ +'^'#193#227#255'Z'#187#220#255'G'#176#212#255'<'#164#200#255'0'#153#189#255
+ +'('#144#180#255'3'#149#182#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0
+ +#0'#'#0#0#0'#'#0'iH>'#131'_90'#142#133#204#230'Zk'#210#246#255'_'#199#235#255
+ +'S'#187#223#255'G'#176#212#255'D'#164#195#255':'#154#183#255'('#144#180#255
+ +')'#144#181#255'4'#156#192#255'N'#182#218#255'}'#204#230'x'#0#0'#'#0#0#0#0#7
+ +'^?8m_8.it'#183#205'rh'#197#226#255'U'#176#205#255'N'#175#206#255'J'#171#205
+ +#255'C'#169#204#255'='#163#199#255'='#160#193#255'@'#161#193#255'I'#164#195
+ +#255'Q'#175#205#255'z'#204#233#130#0#0'#'#0#0#0#0#4'^A7'#138'e>3w'#133#184
+ +#196'Qi'#196#229#252'`'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200
+ +#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255'W'#181#213
+ +#253#135#187#204'w'#0#0'#'#0#0#0'#'#0',#'#26#29'Q2)'#138'p'#177#198'qj'#210
+ +#246#255'`'#199#234#255'\'#183#211#255'O'#171#199#255'B'#161#192#255';'#155
+ +#185#255'9'#149#176#255'8'#146#175#255'6'#156#191#255'N'#182#218#255'{'#206
+ +#233#129#0#0'#'#0#0#0#0#4'pND'#150'lB7'#154'z'#187#206'q]'#184#210#255'P'#178
+ +#212#255'I'#179#216#255'D'#176#212#255'A'#168#205#255'9'#160#196#255'4'#157
+ +#194#255'5'#160#198#255'@'#165#198#255'O'#172#200#255'~'#202#228#134#0#0'#'#0
+ +#0#0#0#5'bD;'#177'P0('#159't'#157#168'Sl'#205#238#251'_'#199#235#255'S'#187
+ +#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144
+ +#181#255'4'#156#192#255'U'#182#216#253#130#192#205'l'#0#0'#'#0#0#0'#'#0'dF='
+ +#150'G,$]{'#196#221'lj'#210#246#255'`'#189#217#255'O'#176#205#255'J'#170#200
+ +#255'L'#168#196#255'I'#164#193#255'='#154#184#255'6'#151#182#255'@'#157#187
+ +#255'N'#182#218#255'z'#204#233#130#0#0'#'#0'dNF'#128'hH?'#142'U5-~'#132#197
+ +#217'j['#186#217#252'Y'#190#225#255'Y'#185#219#255'P'#177#211#255'<'#164#200
+ +#255'0'#153#189#255'1'#147#181#255'9'#153#187#255'@'#164#199#255'P'#175#207
+ +#253'|'#195#215#135#0#0'#'#0'kRJ|pLE'#137'\9-l'#195#218'Ol'#210#245#254'_'
+ +#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('
+ +#144#180#255')'#145#181#255'4'#156#192#255'O'#182#218#255#130#205#229'o'#0#0
+ +'#'#0#0#0#0#6'6"'#27'&M.(t}'#198#223'lk'#204#235#255'I'#175#207#255';'#166
+ +#201#255'4'#162#197#255'.'#158#195#255'-'#157#194#255'-'#156#191#255'/'#155
+ +#190#255'6'#158#192#255'P'#178#210#255'y'#204#234#130#0#0'#'#0#0#0#0#9'bB:'
+ +#188'R2('#164'z'#164#179'U7'#162#195#243#24#159#207#255#24#159#207#255#24#159
+ +#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159
+ +#207#255'.'#159#196#247'{'#184#200'i'#0#0'#'#0#0#0'#'#0'{SIfg@4'#148#26#0#0
+ +#10'q'#161#162'$:'#159#189#158'1'#159#193#188'.'#159#195#211'+'#158#196#234
+ +'+'#159#195#236'-'#159#195#214'0'#159#195#191'7'#160#192#164'^'#161#173'1'#0
+ +#0'#'#0#0#0'#'#0#12'TabShowGlyph'#9#15'TabButtonLayout'#7#11'blGlyphLeft'#0#5
+ +'TMemo'#5'Memo1'#4'Left'#3'8'#1#6'Height'#3#210#1#3'Top'#2#0#5'Width'#3'H'#1
+ +#5'Align'#7#7'alRight'#13'Lines.Strings'#1#6#9'Some Memo'#6#7'alRight'#0#8'T'
+ +'abOrder'#2#0#0#0#0#0#0#6'TPanel'#6'Panel2'#4'Left'#3#134#2#6'Height'#3#236#1
+ +#3'Top'#2#0#5'Width'#3#238#0#5'Align'#7#7'alRight'#12'ClientHeight'#3#236#1
+ +#11'ClientWidth'#3#238#0#8'TabOrder'#2#1#0#6'TLabel'#6'Label1'#4'Left'#2#16#6
+ +'Height'#2#16#3'Top'#3#160#0#5'Width'#2'9'#7'Caption'#6#9'TabHeight'#11'Pare'
+ +'ntColor'#8#0#0#9'TComboBox'#9'ComboBox1'#4'Left'#2#16#6'Height'#2#23#3'Top'
+ +#2#16#5'Width'#2'd'#10'ItemHeight'#2#15#8'OnChange'#7#15'ComboBox1Change'#5
+ +'Style'#7#14'csDropDownList'#8'TabOrder'#2#0#0#0#11'TRadioGroup'#11'RadioGro'
+ +'up1'#4'Left'#3#128#0#6'Height'#2'q'#3'Top'#2#16#5'Width'#2'd'#8'AutoFill'#9
+ +#7'Caption'#6#12'Tab Position'#28'ChildSizing.LeftRightSpacing'#2#6#28'Child'
+ +'Sizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomo'
+ +'genousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildR'
+ +'esize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing'
+ +'.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftTo'
+ +'RightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#12'ClientHeight'#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'RadioGroup1Click'#8'Ta'
+ +'bOrder'#2#1#0#0#9'TCheckBox'#9'CheckBox1'#4'Left'#2#16#6'Height'#2#16#3'Top'
+ +#2'p'#5'Width'#2'd'#8'AutoSize'#8#7'Caption'#6#9'Long Tabs'#7'OnClick'#7#14
+ +'CheckBox1Click'#8'TabOrder'#2#2#0#0#11'TGradButton'#10'NewPageBtn'#4'Left'#2
+ +#16#6'Height'#2#25#3'Top'#2'0'#5'Width'#2'd'#7'Caption'#6#8'New Page'#10'Fon'
+ +'t.Color'#7#7'clWhite'#7'OnClick'#7#15'NewPageBtnClick'#8'TabOrder'#2#3#7'Ta'
+ +'bStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254'?'#9'OverBlend'#5'5^'#186
+ +'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5'Color'#7#6'clBlue'#16'Norm'
+ ,'alBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8'clSilver'#15'BackgroundCo'
+ +'lor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20'GlyphBackground'
+ +'Color'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackgroundDraw'#8#22
+ +'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpacing'#2#15#0#0#11'TGradB'
+ +'utton'#9'DeleteBtn'#4'Left'#2#16#6'Height'#2#25#3'Top'#2'P'#5'Width'#2'd'#7
+ +'Caption'#6#6'Delete'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#14'DeleteBtnC'
+ +'lick'#8'TabOrder'#2#4#7'TabStop'#9#11'NormalBlend'#5#0#0#0#0#0#0#0#128#254
+ +'?'#9'OverBlend'#5'5^'#186'I'#12#2'+'#167#254'?'#9'BaseColor'#7#6'clBlue'#5
+ +'Color'#7#6'clBlue'#16'NormalBlendColor'#7#7'clWhite'#14'OverBlendColor'#7#8
+ +'clSilver'#15'BackgroundColor'#7#9'clBtnFace'#15'ShowFocusBorder'#9#9'ShowGl'
+ +'yph'#8#20'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19
+ +'OwnerBackgroundDraw'#8#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderS'
+ +'pacing'#2#15#0#0#9'TSpinEdit'#9'SpinEdit2'#4'Left'#2#16#6'Height'#2#25#3'To'
+ +'p'#3#176#0#5'Width'#2'd'#13'OnEditingDone'#7#20'SpinEdit2EditingDone'#8'Tab'
+ +'Order'#2#5#0#0#5'TEdit'#5'Edit1'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#136#0
+ +#5'Width'#2'H'#8'TabOrder'#2#6#4'Text'#6#5'Edit1'#0#0#11'TGradButton'#11'Gra'
+ +'dButton1'#4'Left'#2'Z'#6'Height'#2#19#3'Top'#3#136#0#5'Width'#2#26#7'Captio'
+ +'n'#6#3'set'#10'Font.Color'#7#7'clWhite'#7'OnClick'#7#16'GradButton1Click'#8
+ +'TabOrder'#2#7#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'#15'ShowFocusBorder'#9#9'ShowGlyph'#8#20
+ +'GlyphBackgroundColor'#7#7'clWhite'#10'ClickColor'#7#6'clBlue'#19'OwnerBackg'
+ +'roundDraw'#8#22'AutoWidthBorderSpacing'#2#15#23'AutoHeightBorderSpacing'#2
+ +#15#0#0#11'TCheckGroup'#11'CheckGroup1'#4'Left'#3#128#0#6'Height'#2'i'#3'Top'
+ +#3#143#0#5'Width'#2'd'#8'AutoFill'#9#7'Caption'#6#14'Scroll Buttons'#28'Chil'
+ +'dSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'Child'
+ +'Sizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enl'
+ +'argeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizonta'
+ +'l'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'
+ +#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.C'
+ +'ontrolsPerLine'#2#1#13'Items.Strings'#1#6#4'Auto'#6#7'LeftTop'#6#11'RightBo'
+ +'ttom'#0#7'OnClick'#7#16'CheckGroup1Click'#11'OnItemClick'#7#20'CheckGroup1I'
+ +'temClick'#8'TabOrder'#2#8#4'Data'#10#7#0#0#0#3#0#0#0#3#2#2#0#0#11'TRadioGro'
+ +'up'#11'RadioGroup2'#4'Left'#3#130#0#6'Height'#2'i'#3'Top'#3#0#1#5'Width'#2
+ +'d'#8'AutoFill'#9#7'Caption'#6#17'Tab Button Layout'#28'ChildSizing.LeftRigh'
+ +'tSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHo'
+ +'rizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7
+ +#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScale'
+ +'Childs'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.'
+ +'Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'
+ +#2#1#12'ClientHeight'#2'W'#11'ClientWidth'#2'`'#9'ItemIndex'#2#0#13'Items.St'
+ +'rings'#1#6#11'blGlyphLeft'#6#13'blGlyphBottom'#6#12'blGlyphRight'#6#10'blGl'
+ +'yphTop'#0#7'OnClick'#7#16'RadioGroup2Click'#8'TabOrder'#2#9#0#0#0#10'TPopup'
+ +'Menu'#10'PopupMenu1'#4'left'#3#222#2#3'top'#3#141#1#0#9'TMenuItem'#9'MenuIt'
+ +'em1'#3'Tag'#4#152''#18#0#7'Caption'#6#9'New Item1'#0#0#0#10'TImageList'#10
+ +'ImageList1'#4'left'#3#144#2#3'top'#3#141#1#6'Bitmap'#10#14#4#0#0'Li'#1#0#0#0
+ +#16#0#0#0#16#0#0#0#0#0'#'#0'{SIfg@4'#148#26#0#0#10'q'#161#162'$:'#159#189#158
+ +'1'#159#193#188'.'#159#195#211'+'#158#196#234'+'#159#195#236'-'#159#195#214
+ +'0'#159#195#191'7'#160#192#164'^'#161#173'1'#0#0'#'#0#0#0'#'#0#0#0#0#9'bB:'
+ +#188'R2('#164'z'#164#179'U7'#162#195#243#24#159#207#255#24#159#207#255#24#159
+ +#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159#207#255#24#159
+ +#207#255'.'#159#196#247'{'#184#200'i'#0#0'#'#0#0#0#0#6'6"'#27'&M.(t}'#198#223
+ +'lk'#204#235#255'I'#175#207#255';'#166#201#255'4'#162#197#255'.'#158#195#255
+ +'-'#157#194#255'-'#156#191#255'/'#155#190#255'6'#158#192#255'P'#178#210#255
+ +'y'#204#234#130#0#0'#'#0'kRJ|pLE'#137'\9-l'#195#218'Ol'#210#245#254'_'#199
+ +#235#255'S'#187#223#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144
+ +#180#255')'#145#181#255'4'#156#192#255'O'#182#218#255#130#205#229'o'#0#0'#'#0
+ +'dNF'#128'hH?'#142'U5-~'#132#197#217'j['#186#217#252'Y'#190#225#255'Y'#185
+ +#219#255'P'#177#211#255'<'#164#200#255'0'#153#189#255'1'#147#181#255'9'#153
+ +#187#255'@'#164#199#255'P'#175#207#253'|'#195#215#135#0#0'#'#0#0#0'#'#0'dF='
+ +#150'G,$]{'#196#221'lj'#210#246#255'`'#189#217#255'O'#176#205#255'J'#170#200
+ +#255'L'#168#196#255'I'#164#193#255'='#154#184#255'6'#151#182#255'@'#157#187
+ +#255'N'#182#218#255'z'#204#233#130#0#0'#'#0#0#0#0#5'bD;'#177'P0('#159't'#157
+ ,#168'Sl'#205#238#251'_'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200
+ +#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255'U'#182#216
+ +#253#130#192#205'l'#0#0'#'#0#0#0#0#4'pND'#150'lB7'#154'z'#187#206'q]'#184#210
+ +#255'P'#178#212#255'I'#179#216#255'D'#176#212#255'A'#168#205#255'9'#160#196
+ +#255'4'#157#194#255'5'#160#198#255'@'#165#198#255'O'#172#200#255'~'#202#228
+ +#134#0#0'#'#0#0#0'#'#0',#'#26#29'Q2)'#138'p'#177#198'qj'#210#246#255'`'#199
+ +#234#255'\'#183#211#255'O'#171#199#255'B'#161#192#255';'#155#185#255'9'#149
+ +#176#255'8'#146#175#255'6'#156#191#255'N'#182#218#255'{'#206#233#129#0#0'#'#0
+ +#0#0#0#4'^A7'#138'e>3w'#133#184#196'Qi'#196#229#252'`'#199#235#255'S'#187#223
+ +#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144#180#255')'#144#181
+ +#255'4'#156#192#255'W'#181#213#253#135#187#204'w'#0#0'#'#0#0#0#0#7'^?8m_8.it'
+ +#183#205'rh'#197#226#255'U'#176#205#255'N'#175#206#255'J'#171#205#255'C'#169
+ +#204#255'='#163#199#255'='#160#193#255'@'#161#193#255'I'#164#195#255'Q'#175
+ +#205#255'z'#204#233#130#0#0'#'#0#0#0'#'#0'iH>'#131'_90'#142#133#204#230'Zk'
+ +#210#246#255'_'#199#235#255'S'#187#223#255'G'#176#212#255'D'#164#195#255':'
+ +#154#183#255'('#144#180#255')'#144#181#255'4'#156#192#255'N'#182#218#255'}'
+ +#204#230'x'#0#0'#'#0#0#0#0#6'X>5|`:0'#181'{'#175#193'm^'#187#219#252'^'#193
+ +#227#255'Z'#187#220#255'G'#176#212#255'<'#164#200#255'0'#153#189#255'('#144
+ +#180#255'3'#149#182#255'B'#162#196#255'T'#177#209#253'~'#192#210#136#0#0'#'#0
+ +'Q<6&nKB'#142'L-&kv'#187#210'ok'#210#245#255']'#186#213#255'Q'#175#205#255'R'
+ +#172#200#255'J'#168#199#255'E'#163#195#255'F'#159#188#255'='#153#184#255'@'
+ +#158#187#255'O'#181#217#255'z'#205#235#130#0#0'#'#0'fNI'#130'Y=7pmB7pa'#134
+ +#150'Dp'#208#242#246'_'#199#235#255'S'#187#223#255'G'#176#212#255'<'#164#200
+ +#255'0'#153#189#255'('#144#180#255')'#144#181#255'4'#156#192#255'U'#183#217
+ +#250#133#201#225'O'#0#0'#'#0'nUN'#141'pND'#166'h?5'#165#28#14#14#18#134#198
+ +#220'-k'#194#225#153'_'#188#221#184'U'#180#212#210'L'#169#202#232'C'#160#192
+ +#234'>'#156#188#213'B'#158#191#188'P'#168#199#159'y'#185#208';'#0#0'#'#0#0#0
+ +'#'#0#0#0#0
]);
diff --git a/components/gradcontrols/examples/Forms/unit1.pas b/components/gradcontrols/examples/Forms/unit1.pas
index d03329a89..8bb5f4e98 100644
--- a/components/gradcontrols/examples/Forms/unit1.pas
+++ b/components/gradcontrols/examples/Forms/unit1.pas
@@ -84,10 +84,14 @@ var
implementation
+uses
+ gradtabstyle;
+
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
+ GradTabControl1.Style :=TGradTabVistaStyle.Create;
GradTabControl1.Align:=alClient;
GradTabControl1.TabPosition:=tpTop;
SpinEdit2.Value:=GradTabControl1.TabHeight;
diff --git a/components/gradcontrols/examples/gradcontroltest.lpi b/components/gradcontrols/examples/gradcontroltest.lpi
index 84084a0b5..bdf979658 100644
--- a/components/gradcontrols/examples/gradcontroltest.lpi
+++ b/components/gradcontrols/examples/gradcontroltest.lpi
@@ -16,7 +16,7 @@
-
+
diff --git a/components/gradcontrols/packages/gradtabcontrol.lpk b/components/gradcontrols/packages/gradtabcontrol.lpk
index 06c6c7ddd..12ad77990 100644
--- a/components/gradcontrols/packages/gradtabcontrol.lpk
+++ b/components/gradcontrols/packages/gradtabcontrol.lpk
@@ -25,7 +25,7 @@
-
+
@@ -35,6 +35,10 @@
+
+
+
+
diff --git a/components/gradcontrols/packages/gradtabcontrol.pas b/components/gradcontrols/packages/gradtabcontrol.pas
index c407aa495..bfa6a05f9 100644
--- a/components/gradcontrols/packages/gradtabcontrol.pas
+++ b/components/gradcontrols/packages/gradtabcontrol.pas
@@ -8,7 +8,7 @@ unit gradtabcontrol;
interface
uses
-ugradtabcontrol, gradtabcontroleditor, LazarusPackageIntf;
+ ugradtabcontrol, gradtabcontroleditor, gradtabstyle, LazarusPackageIntf;
implementation
diff --git a/components/gradcontrols/src/gradtabstyle.pas b/components/gradcontrols/src/gradtabstyle.pas
new file mode 100644
index 000000000..5567c088a
--- /dev/null
+++ b/components/gradcontrols/src/gradtabstyle.pas
@@ -0,0 +1,322 @@
+unit gradtabstyle;
+
+{$mode objfpc}{$H+}
+
+{-------------------------------------
+Style-Class for TGradTabControl
+--------------------------------------}
+
+interface
+
+uses
+ Classes, SysUtils, Controls, Graphics, Buttons, ExtCtrls, ugradbtn;
+
+type
+ TStylePaintEvent = procedure(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect;
+ BState : TButtonState) of object;
+
+ { TGradTabStyleBase }
+
+ TStyleBaseOptions = set of (sbTabButton, sbLeftRightButton, sbBorderButton, sbCloseButton);
+
+ TGradTabStyleBase = class
+ private
+ function GetHasCloseButtonPaint: Boolean;
+ function GetHasTabButtonPaint: Boolean;
+ function GetHasLeftRightButtonPaint: Boolean;
+ function GetHasBorderButtonPaint: Boolean;
+ protected
+ FTheTabControl: TCustomControl;
+ FOptions : TStyleBaseOptions;
+ public
+ constructor Create; virtual;
+ procedure TabControl(Sender: TCustomControl;
+ TargetCanvas: TCanvas); virtual; abstract;
+ procedure TabButton(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState); virtual; abstract;
+ procedure TabCloseButton(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState); virtual; abstract;
+ procedure TabButtonBorder(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState); virtual; abstract;
+ procedure TabLeftRightButton(Sender: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState); virtual; abstract;
+ procedure PrepareButton(Button: TGradButton); virtual;
+ property TheTabControl : TCustomControl read FTheTabControl write FTheTabControl;
+ property HasTabButtonPaint : Boolean read GetHasTabButtonPaint;
+ property HasLeftRightButtonPaint : Boolean read GetHasLeftRightButtonPaint;
+ property HasBorderButtonPaint : Boolean read GetHasBorderButtonPaint;
+ property HasCloseButtonPaint : Boolean read GetHasCloseButtonPaint;
+ end;
+
+ { TGradTabStandardStyle }
+
+ TGradTabStandardStyle = class(TGradTabStyleBase)
+ public
+ procedure TabControl(Sender: TCustomControl; TargetCanvas: TCanvas);
+ override;
+ end;
+
+ { TGradTabVistaStyle }
+
+ TButtonVistaStyle = record
+ BorderColor : TColor;
+ InnerBorderColor : TColor;
+ TopStartColor : TColor;
+ TopStopColor : TColor;
+ BottomStartColor : TColor;
+ BottomStopColor : TColor;
+ end;
+
+ TGradTabVistaStyle = class(TGradTabStyleBase)
+ private
+ Normal : TButtonVistaStyle;
+ Hover : TButtonVistaStyle;
+ ActiveButton : TButtonVistaStyle;
+ public
+ constructor Create; override;
+ procedure TabControl(Sender: TCustomControl; TargetCanvas: TCanvas);
+ override;
+ procedure TabButton(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState); override;
+ procedure TabCloseButton(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState: TButtonState); override;
+ procedure TabButtonBorder(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState); override;
+ procedure PrepareButton(Button: TGradButton); override;
+ end;
+
+implementation
+
+uses
+ ugradtabcontrol, LCLProc;
+
+{ TGradTabStyleBase }
+
+function TGradTabStyleBase.GetHasCloseButtonPaint: Boolean;
+begin
+ Result := sbCloseButton in FOptions;
+end;
+
+function TGradTabStyleBase.GetHasTabButtonPaint: Boolean;
+begin
+ Result := sbTabButton in FOptions;
+end;
+
+function TGradTabStyleBase.GetHasLeftRightButtonPaint: Boolean;
+begin
+ Result := sbLeftRightButton in FOptions;
+end;
+
+function TGradTabStyleBase.GetHasBorderButtonPaint: Boolean;
+begin
+ Result := sbBorderButton in FOptions;
+end;
+
+constructor TGradTabStyleBase.Create;
+begin
+ FOptions:= [];
+end;
+
+procedure TGradTabStyleBase.PrepareButton(Button: TGradButton);
+begin
+ // nothing
+end;
+
+{ TGradTabStandardStyle }
+
+procedure TGradTabStandardStyle.TabControl(Sender: TCustomControl;
+ TargetCanvas: TCanvas);
+var
+ AClientRect : TRect;
+begin
+ TargetCanvas.Brush.Color:=Sender.Color;
+ TargetCanvas.FillRect(0,0,Sender.Width, Sender.Height);
+
+ TargetCanvas.Pen.Color:=clBlack;
+
+ AClientRect := (Sender as TGradTabControl).GetClientRect;
+
+ TargetCanvas.Rectangle(AClientRect.Left-2, AClientRect.Top-2,
+ AClientRect.Right+2, AClientRect.Bottom+2);
+end;
+
+{ TGradTabVistaStyle }
+
+constructor TGradTabVistaStyle.Create;
+begin
+ inherited Create;
+
+ FOptions:=[sbTabButton, sbBorderButton, sbCloseButton];
+
+ with Normal do
+ begin
+ BorderColor:=TColor($8b8c90);
+ InnerBorderColor:= TColor($fbfcff);
+ TopStartColor := TColor($f2f2f2);
+ TopStopColor := TColor($ebebeb);
+ BottomStartColor := TColor($dddddb);
+ BottomStopColor := TColor($cfcfcf);
+ end;
+
+ with Hover do
+ begin
+ BorderColor:=RGBToColor(85, 121, 145);
+ InnerBorderColor:= RGBToColor(224, 255, 255);
+ TopStartColor := RGBToColor(233, 246, 254);
+ TopStopColor := RGBToColor(219, 238, 252);
+ BottomStartColor := RGBToColor(190, 231, 253);
+ BottomStopColor := RGBToColor(167, 217, 244);
+ end;
+
+ with ActiveButton do
+ begin
+ BorderColor:=TColor($8b8c91);
+ InnerBorderColor:= TColor($FFFFFF);
+ TopStartColor := TColor($FFFFFF);
+ TopStopColor := TColor($FFFFFF);
+ BottomStartColor := TColor($FFFFFF);
+ BottomStopColor := TColor($FFFFFF);
+ end;
+end;
+
+procedure TGradTabVistaStyle.TabControl(Sender: TCustomControl;
+ TargetCanvas: TCanvas);
+var
+ AClientRect : TRect;
+begin
+ TargetCanvas.Brush.Color:=clWhite;
+ TargetCanvas.FillRect(0,0,Sender.Width, Sender.Height);
+
+ TargetCanvas.Pen.Color:=Normal.BorderColor;
+
+ AClientRect := (Sender as TGradTabControl).GetClientRect;
+
+ TargetCanvas.Rectangle(AClientRect.Left-2, AClientRect.Top-2,
+ AClientRect.Right+2, AClientRect.Bottom+2);
+end;
+
+procedure TGradTabVistaStyle.TabButton(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState);
+var
+ ColorSet: TButtonVistaStyle;
+ UpperRect, LowerRect : TRect;
+ FGradTabControl : TGradTabControl;
+ FGradientDirection : TGradientDirection;
+begin
+ FGradTabControl := Sender as TGradTabControl;
+ if AIndex = FGradTabControl.PageIndex then
+ BState := bsDown;
+
+ case BState of
+ bsDown: ColorSet := ActiveButton;
+ bsHot: ColorSet := Hover;
+ else ColorSet := Normal;
+ end;
+
+ UpperRect := R;
+ UpperRect.Bottom:= UpperRect.Bottom div 2;
+
+ LowerRect := R;
+ LowerRect.Top := UpperRect.Bottom;
+
+ case FGradTabControl.TabPosition of
+ tpTop, tpBottom: FGradientDirection := gdVertical;
+ tpLeft, tpRight:
+ if FGradTabControl.LongTabs then
+ FGradientDirection := gdVertical
+ else
+ FGradientDirection := gdHorizontal;
+ end;
+
+ with TargetCanvas do
+ begin
+ GradientFill(UpperRect, ColorSet.TopStartColor,
+ ColorSet.TopStopColor, FGradientDirection);
+ GradientFill(LowerRect, ColorSet.BottomStartColor,
+ ColorSet.BottomStopColor, FGradientDirection);
+ end;
+end;
+
+procedure TGradTabVistaStyle.TabCloseButton(Sender: TCustomControl;
+ AIndex: Integer; Button: TGradButton; TargetCanvas: TCanvas; R: TRect;
+ BState: TButtonState);
+begin
+ TabButton(Sender, AIndex, Button, TargetCanvas, R, BState);
+end;
+
+procedure TGradTabVistaStyle.TabButtonBorder(Sender: TCustomControl; AIndex: Integer;
+ Button: TGradButton; TargetCanvas: TCanvas; R: TRect; BState : TButtonState);
+var
+ ColorSet: TButtonVistaStyle;
+begin
+ //DebugLn('Border R: ',DbgS(R));
+
+ case BState of
+ bsDown: ColorSet := ActiveButton;
+ bsHot: ColorSet := Hover;
+ else ColorSet := Normal;
+ end;
+
+ with Button do
+ begin
+ //Top
+ if (bsTopLine in BorderSides) then
+ begin
+ TargetCanvas.Pen.Color:=ColorSet.BorderColor;
+ TargetCanvas.Line(R.Left,0,R.Right,0);
+ TargetCanvas.Pen.Color:=ColorSet.InnerBorderColor;
+ TargetCanvas.Line(R.Left,1,R.Right,1);
+ end;
+
+ //Left
+ if (bsLeftLine in BorderSides) then
+ begin
+ TargetCanvas.Pen.Color:=ColorSet.BorderColor;
+ TargetCanvas.Line(0,R.Top,0,R.Bottom);
+ TargetCanvas.Pen.Color:=ColorSet.InnerBorderColor;
+ TargetCanvas.Line(1,R.Top,1,R.Bottom);
+ end;
+
+ //Right
+ if (bsRightLine in BorderSides) then
+ begin
+ TargetCanvas.Pen.Color:=ColorSet.BorderColor;
+ TargetCanvas.Line(Width-1,R.Top,Width-1,R.Bottom);
+ TargetCanvas.Pen.Color:=ColorSet.InnerBorderColor;
+ TargetCanvas.Line(Width-2,R.Top,Width-2,R.Bottom);
+ end;
+
+ //Bottom
+ if (bsBottomLine in BorderSides) then
+ begin
+ TargetCanvas.Pen.Color:=ColorSet.BorderColor;
+ TargetCanvas.Line(R.Left,Height-1,R.Right,Height-1);
+ TargetCanvas.Pen.Color:=ColorSet.InnerBorderColor;
+ TargetCanvas.Line(R.Left,Height-2,R.Right,Height-2);
+ end;
+
+ //TopLeft
+ if (bsTopLine in BorderSides) AND (bsLeftLine in BorderSides) then
+ TargetCanvas.Pixels[1,1]:=ColorSet.BorderColor;
+
+ //TopRight
+ if (bsTopLine in BorderSides) AND (bsRightLine in BorderSides) then
+ TargetCanvas.Pixels[Width-2,1] := ColorSet.BorderColor;
+
+ //BottomLeft
+ if (bsBottomLine in BorderSides) AND (bsLeftLine in BorderSides) then
+ TargetCanvas.Pixels[1, Height-2]:=ColorSet.BorderColor;
+
+ //BottomRight
+ if (bsBottomLine in BorderSides) AND (bsRightLine in BorderSides) then
+ TargetCanvas.Pixels[Width-2,Height-2]:=ColorSet.BorderColor;
+ end;
+end;
+
+procedure TGradTabVistaStyle.PrepareButton(Button: TGradButton);
+begin
+ Button.Font.Color:=clBlack;
+end;
+
+end.
+
diff --git a/components/gradcontrols/src/ugradtabcontrol.pas b/components/gradcontrols/src/ugradtabcontrol.pas
index ad7ec02e2..86c79fbff 100644
--- a/components/gradcontrols/src/ugradtabcontrol.pas
+++ b/components/gradcontrols/src/ugradtabcontrol.pas
@@ -18,7 +18,7 @@ interface
uses
Classes,LResources, SysUtils, Menus, LCLType,
LCLProc, LCLIntf,ExtCtrls, Graphics, ugradbtn, Controls, uRotateBitmap,
- Buttons, Forms, ImgList;
+ Buttons, Forms, ImgList, gradtabstyle;
type
TGradTabControl = class;
@@ -211,6 +211,8 @@ type
function GetViewableTabs(FromIndex : Integer) : TTabs;
function GetTabsOfSide(FromIndex : Integer; FromLeftSide : Boolean) : TTabs;
procedure ScrollToTab(PIndex : Integer);
+ procedure UpdateAllButtons;
+ procedure NewStyle;
public
constructor Create(AOwner: TComponent; var thePageList: TListWithEvent;
TheTabControl : TGradTabControl);
@@ -271,18 +273,24 @@ type
procedure Move(CurIndex, NewIndex: Integer); override;
end;
+ TGradTabControlPaintEvent = procedure(Sender: TCustomControl;
+ TargetCanvas: TCanvas) of object;
+
{ TGradTabControl }
TGradTabControl = class(TCustomControl)
private
FAutoShowScrollButton: Boolean;
+ FCustomDraw: Boolean;
FImages: TImageList;
FMoveIncrement: Integer;
FLeftButton, FRightButton : TGradButton;
+ FOnCustomDraw: TGradTabControlPaintEvent;
FOnTabCloseButtonClick: TGradTabPageButtonClickEvent;
FOnPageChanged: TNotifyEvent;
FShowLeftTopScrollButton: Boolean;
FShowRightBottomScrollButton: Boolean;
+ FStyle: TGradTabStyleBase;
FTabStrings : TStrings; //TGradTabPages
FPageList: TList; //Is Managed by TGradTabPages
FOnTabButtonClick : TGradTabPageButtonClickEvent;
@@ -305,7 +313,9 @@ type
function GetTabPopupMenu: TPopupMenu;
procedure ImageListChange(Sender: TObject);
procedure SetActiveTabColor(const AValue: TColor);
+ procedure SetCustomDraw(const AValue: Boolean);
procedure SetNormalTabColor(const AValue: TColor);
+ procedure SetStyle(const AValue: TGradTabStyleBase);
procedure SetTabPopupMenu(const AValue: TPopupMenu);
procedure UpdateTabImages;
function GetCurrentPage : TGradTabPage;
@@ -350,6 +360,16 @@ type
procedure SubDragDrop(Sender, Source: TObject; X,Y: Integer);
//End
+ // Style Event Wrapper
+ procedure StyleTabButton(Sender: TGradButton;
+ TargetCanvas: TCanvas; R: TRect; BState : TButtonState);
+ procedure StyleTabCloseButton(Sender: TGradButton;
+ TargetCanvas: TCanvas; R: TRect; BState : TButtonState);
+ procedure StyleTabButtonBorder(Sender: TGradButton;
+ TargetCanvas: TCanvas; R: TRect; BState : TButtonState);
+
+ // End
+
procedure PopupTabs(Sender: TObject);
procedure MoveLeftTopClick(Sender: TObject);
procedure MoveRightBottomClick(Sender: TObject);
@@ -416,7 +436,7 @@ type
property OnClick;
property OnDblClick;
property TabPopupMenu : TPopupMenu read GetTabPopupMenu write SetTabPopupMenu;
-
+ property PopupMenu;
property PageIndex : Integer read FPageIndex write SetCurrentPageNum;
property TabHeight : Integer read FTabHeight write SetTabHeight;
property TabPosition : TTabPosition read FTabPosition write SetTabPosition default tpTop;
@@ -430,6 +450,9 @@ type
property Images : TImageList read FImages write SetImages;
property NormalTabColor: TColor read GetNormalTabColor write SetNormalTabColor default clBlue;
property ActiveTabColor: TColor read GetActiveTabColor write SetActiveTabColor default clGreen;
+ property CustomDraw : Boolean read FCustomDraw write SetCustomDraw;
+ property OnCustomDraw : TGradTabControlPaintEvent read FOnCustomDraw write FOnCustomDraw;
+ property Style : TGradTabStyleBase read FStyle write SetStyle;
end;
procedure Register;
@@ -503,7 +526,7 @@ begin
inherited Create(AOwner);
ControlStyle := ControlStyle+[csNoDesignSelectable,csDesignInteractive]-[csCaptureMouse];
- FCloseButton := TGradTabCloseButton.Create(Self);
+ FCloseButton := TGradTabCloseButton.Create(AOwner);
FCloseButton.Width:=14;
FCloseButton.Height:=14;
TextAlignment:=taCenter;
@@ -557,6 +580,8 @@ begin
FCloseButton.Top:=NewTop+TheRect.Top;
FCloseButton.Left:=NewLeft+TheRect.Left;
+
+ FCloseButton.UpdateButton;
end;
{-------------------------------------------------------------------------------
@@ -687,7 +712,7 @@ procedure TGradTabPageButton.GetContentRect(var TheRect: TRect);
begin
inherited GetContentRect(TheRect);
- if ShowGlyph then
+ if ShowCloseButton then
begin
case RotateDirection of
rdNormal: begin
@@ -1205,16 +1230,43 @@ begin
with AButton do
begin
- Left:=-123;
- Parent := Self;
- ShowFocusBorder:=false;
- TextAlignment:=taCenter;
- BorderSides:=[bsTopLine,bsRightLine,bsLeftLine];
- OnMouseDown:=@FTabControl.PageButtonMouseDown;
- OnMouseUp:=@FTabControl.PageButtonMouseUp;
- OnClick:=@FTabControl.PageButtonMouseClick;
- OnMouseMove:=@FTabControl.PageButtonMouseMove;
- FCloseButton.OnMouseUp:=@FTabControl.PageCloseButtonMouseUp;
+ Left := -123;
+ Parent := Self;
+ ShowFocusBorder := false;
+ TextAlignment := taCenter;
+ BorderSides := [bsTopLine,bsRightLine,bsLeftLine];
+ OnMouseDown := @FTabControl.PageButtonMouseDown;
+ OnMouseUp := @FTabControl.PageButtonMouseUp;
+ OnClick := @FTabControl.PageButtonMouseClick;
+ OnMouseMove := @FTabControl.PageButtonMouseMove;
+ FCloseButton.OnMouseUp := @FTabControl.PageCloseButtonMouseUp;
+
+ FTabControl.Style.PrepareButton(AButton);
+
+ if FTabControl.Style.HasTabButtonPaint then
+ begin
+ OnNormalBackgroundPaint := @FTabControl.StyleTabButton;
+ OnDisabledBackgroundPaint := @FTabControl.StyleTabButton;
+ OnDownBackgroundPaint := @FTabControl.StyleTabButton;
+ OnHotBackgroundPaint := @FTabControl.StyleTabButton;
+
+ if FTabControl.Style.HasBorderButtonPaint then
+ OnBorderBackgroundPaint := @FTabControl.StyleTabButtonBorder;
+
+ OwnerBackgroundDraw := true;
+
+ if FTabControl.Style.HasCloseButtonPaint then
+ begin
+ FCloseButton.OnNormalBackgroundPaint := @FTabControl.StyleTabCloseButton;
+ FCloseButton.OnDisabledBackgroundPaint := @FTabControl.StyleTabCloseButton;
+ FCloseButton.OnDownBackgroundPaint := @FTabControl.StyleTabCloseButton;
+ FCloseButton.OnHotBackgroundPaint := @FTabControl.StyleTabCloseButton;
+
+ FCloseButton.OwnerBackgroundDraw := true;
+ end;
+ end else begin
+ OwnerBackgroundDraw := false;
+ end;
end;
if Assigned(PopupMenu) then
@@ -1379,85 +1431,85 @@ begin
case FTabPosition of
tpTop:
begin
- //if B.Width < B.GetAutoWidth then
- B.Width := B.GetAutoWidth;
+ //if B.Width < B.GetAutoWidth then
+ B.Width := B.GetAutoWidth;
- B.Left := LastLeft;
- LastLeft := LastLeft + B.Width + 1;
+ B.Left := LastLeft;
+ LastLeft := LastLeft + B.Width + 1;
- if FActiveIndex = i then begin
- B.Top := 0;
- B.Height:= BarHeight;
- end else begin
- B.Top := 3;
- B.Height:= BarHeight-3;
- end;
+ if FActiveIndex = i then begin
+ B.Top := 0;
+ B.Height:= BarHeight;
+ end else begin
+ B.Top := 3;
+ B.Height:= BarHeight-3;
+ end;
end;
tpBottom:
begin
- //if B.Width < B.GetAutoWidth then
- B.Width := B.GetAutoWidth;
+ //if B.Width < B.GetAutoWidth then
+ B.Width := B.GetAutoWidth;
- B.Left := LastLeft;
- LastLeft := LastLeft + B.Width + 1;
+ B.Left := LastLeft;
+ LastLeft := LastLeft + B.Width + 1;
- B.Top := 0;
+ B.Top := 0;
- if FActiveIndex = i then
- B.Height := BarHeight
- else
- B.Height := BarHeight-3;
+ if FActiveIndex = i then
+ B.Height := BarHeight
+ else
+ B.Height := BarHeight-3;
end;
tpLeft:
begin
- if FTabControl.LongTabs then begin
- if (B.GetAutoWidth > FTabControl.LongWidth) then
- begin
- FTabControl.LongWidth:=B.GetAutoWidth;
- Exit;
- end;
+ if FTabControl.LongTabs then begin
+ if (B.GetAutoWidth > FTabControl.LongWidth) then
+ begin
+ FTabControl.LongWidth:=B.GetAutoWidth;
+ Exit;
+ end;
+ end;
- end;
+ B.Height:= B.GetAutoHeight;
- B.Height:= B.GetAutoHeight;
+ B.Top := LastTop;
+ LastTop := LastTop + B.Height + 1;
- B.Top := LastTop;
- LastTop := LastTop + B.Height + 1;
-
- if FActiveIndex = i then begin
- B.Left := 0;
- B.Width:= FTabControl.GetTabBarSize(tpLeft);
- end else begin
- B.Left := 3;
- B.Width:= FTabControl.GetTabBarSize(tpLeft)-3;
- end;
+ if FActiveIndex = i then begin
+ B.Left := 0;
+ B.Width:= FTabControl.GetTabBarSize(tpLeft);
+ end else begin
+ B.Left := 3;
+ B.Width:= FTabControl.GetTabBarSize(tpLeft)-3;
+ end;
end;
tpRight:
begin
- if FTabControl.LongTabs then begin
- if (B.GetAutoWidth > FTabControl.LongWidth) then
- begin
- FTabControl.LongWidth:=B.GetAutoWidth;
- Exit;
- end;
- end;
+ if FTabControl.LongTabs then begin
+ if (B.GetAutoWidth > FTabControl.LongWidth) then
+ begin
+ FTabControl.LongWidth:=B.GetAutoWidth;
+ Exit;
+ end;
+ end;
- B.Height:= B.GetAutoHeight;
+ B.Height:= B.GetAutoHeight;
- B.Top := LastTop;
- LastTop := LastTop + B.Height + 1;
+ B.Top := LastTop;
+ LastTop := LastTop + B.Height + 1;
- B.Left := 0;
+ B.Left := 0;
- if FActiveIndex = i then
- B.Width := FTabControl.GetTabBarSize(tpRight)
- else begin
- B.Width := FTabControl.GetTabBarSize(tpRight)-3;
- end;
- {$IFDEF DEBUGTAB}
+ if FActiveIndex = i then
+ B.Width := FTabControl.GetTabBarSize(tpRight)
+ else begin
+ B.Width := FTabControl.GetTabBarSize(tpRight)-3;
+ end;
+
+ {$IFDEF DEBUGTAB}
DebugLn('B.Width=%d TabBarSize(tpRight)=%d FActive=%d',[B.Width, FTabControl.GetTabBarSize(tpRight), FActiveIndex]);
- {$ENDIF}
+ {$ENDIF}
end;
end;
@@ -1468,10 +1520,10 @@ begin
end;
{$IFDEF DEBUGTAB}
- DebugLn('BarWidth=%d LastLeft=%d FMovedTo=%d BarHeight=%d LastTop=%d',[BarWidth,
+ DebugLn('BarWidth=%d LastLeft=%d FMovedTo=%d BarHeight=%d LastTop=%d',[BarWidth,
LastLeft, FMovedTo, BarHeight, LastTop]);
- DebugLn('BarWidth < LastLeft-FMovedTo = %s BarHeight < LastTop-FMovedTo=%s',[
+ DebugLn('BarWidth < LastLeft-FMovedTo = %s BarHeight < LastTop-FMovedTo=%s',[
BoolStr(BarWidth < (LastLeft-FMovedTo)), BoolStr(BarHeight < (LastTop-FMovedTo))]);
{$ENDIF}
@@ -1482,17 +1534,17 @@ begin
OR (FMovedTo <> 1))
AND ((BarHeight<>0)
AND (BarWidth<>0)) then begin
- FTabControl.FLeftButton.Visible:=true;
- FTabControl.FRightButton.Visible:=true;
+ FTabControl.FLeftButton.Visible:=true;
+ FTabControl.FRightButton.Visible:=true;
end else begin
- FTabControl.FLeftButton.Visible:=false;
- FTabControl.FRightButton.Visible:=false;
+ FTabControl.FLeftButton.Visible:=false;
+ FTabControl.FRightButton.Visible:=false;
end;
{$IFDEF DEBUGTAB}
- DebugLn('FR=%s FL=%s',[BoolStr(FTabControl.FRightButton.Visible),BoolStr(FTabControl.FLeftButton.Visible)]);
+ DebugLn('FR=%s FL=%s',[BoolStr(FTabControl.FRightButton.Visible),BoolStr(FTabControl.FLeftButton.Visible)]);
- DebugLn('OrderButton End');
+ DebugLn('OrderButton End');
{$ENDIF}
end;
@@ -1542,63 +1594,63 @@ end;
------------------------------------------------------------------------------}
procedure TGradTabPagesBar.FocusButton(Index: Integer);
var
- CurTabs : TTabs;
- DoNext : Boolean;
- c : Integer;
+ CurTabs : TTabs;
+ DoNext : Boolean;
+ c : Integer;
begin
- if csDestroying in FTabControl.ComponentState then Exit;
- if (Index < 0) or (Index >= FPageList.Count) then Exit;
+ if csDestroying in FTabControl.ComponentState then Exit;
+ if (Index < 0) or (Index >= FPageList.Count) then Exit;
- {$IFDEF DEBUGTAB}
- DebugLn('TGradTabPagesBar.FocusButton Index: %d Assigned %s', [Index,BoolToStr(Assigned(TGradTabPage(FPageList.Items[Index]).TabButton),true)]);
- {$ENDIF}
+ {$IFDEF DEBUGTAB}
+ DebugLn('TGradTabPagesBar.FocusButton Index: %d Assigned %s', [Index,BoolToStr(Assigned(TGradTabPage(FPageList.Items[Index]).TabButton),true)]);
+ {$ENDIF}
- with TGradTabPage(FPageList.Items[Index]).TabButton do
- begin
- case FTabPosition of
- tpTop, tpBottom : begin
- Top:=0;
- Height:=Self.Height;
+ with TGradTabPage(FPageList.Items[Index]).TabButton do
+ begin
+ case FTabPosition of
+ tpTop, tpBottom : begin
+ Top:=0;
+ Height:=Self.Height;
- DoNext := ((Left+Width)>= Self.Width);
- end;
- tpRight, tpLeft: begin
- Left := 0;
- Width:= Self.Width;
+ DoNext := ((Left+Width)>= Self.Width);
+ end;
+ tpRight, tpLeft: begin
+ Left := 0;
+ Width:= Self.Width;
- if FTabControl.LongTabs then
- Height := FTabControl.TabHeight;
-
- DoNext := ((Top+Height)>= Self.Height);
- end;
- end;
-
- if TGradTabPage(FPageList.Items[Index]).OwnerTabColor then
- Color := TGradTabPage(FPageList.Items[Index]).ActiveTabColor
- else
- Color := ActiveTabColor;
+ if FTabControl.LongTabs then
+ Height := FTabControl.TabHeight;
+ DoNext := ((Top+Height)>= Self.Height);
+ end;
end;
- {$IFDEF DEBUGTAB}
- DebugLn('FR=%s FL=%s',[BoolStr(FTabControl.FRightButton.Visible),BoolStr(FTabControl.FLeftButton.Visible)]);
- {$ENDIF}
+ if TGradTabPage(FPageList.Items[Index]).OwnerTabColor then
+ Color := TGradTabPage(FPageList.Items[Index]).ActiveTabColor
+ else
+ Color := ActiveTabColor;
- if not (FTabControl.FRightButton.Visible AND FTabControl.FLeftButton.Visible) then Exit;
+ end;
+
+ {$IFDEF DEBUGTAB}
+ DebugLn('FR=%s FL=%s',[BoolStr(FTabControl.FRightButton.Visible),BoolStr(FTabControl.FLeftButton.Visible)]);
+ {$ENDIF}
+
+ if not (FTabControl.FRightButton.Visible AND FTabControl.FLeftButton.Visible) then Exit;
C := 0;
- {$IFDEF DEBUGTAB}
- DebugLn('Left=%d Width=%d Width=%d',[TGradTabPage(FPageList.Items[Index]).TabButton.Left,
- TGradTabPage(FPageList.Items[Index]).TabButton.Width, Width]);
+ {$IFDEF DEBUGTAB}
+ DebugLn('Left=%d Width=%d Width=%d',[TGradTabPage(FPageList.Items[Index]).TabButton.Left,
+ TGradTabPage(FPageList.Items[Index]).TabButton.Width, Width]);
- DebugLn('FocusButton Before ScrollToTab');
- {$ENDIF}
+ DebugLn('FocusButton Before ScrollToTab');
+ {$ENDIF}
- ScrollToTab(Index);
+ ScrollToTab(Index);
- {$IFDEF DEBUGTAB}
- DebugLn('FocusButton After ScrollToTab');
- {$ENDIF}
+ {$IFDEF DEBUGTAB}
+ DebugLn('FocusButton After ScrollToTab');
+ {$ENDIF}
end;
{-------------------------------------------------------------------------------
@@ -1606,26 +1658,26 @@ end;
------------------------------------------------------------------------------}
procedure TGradTabPagesBar.SetTabPosition(Value: TTabPosition);
- function DbgsTabPosition(V : TTabPosition) : String;
- begin
- case V of
- tpTop : Result := 'tpTop';
- tpBottom: Result := 'tpBottom';
- tpRight: Result := 'tpRight';
- tpLeft: Result := 'tpLeft';
- end;
- end;
+ function DbgsTabPosition(V : TTabPosition) : String;
+ begin
+ case V of
+ tpTop : Result := 'tpTop';
+ tpBottom: Result := 'tpBottom';
+ tpRight: Result := 'tpRight';
+ tpLeft: Result := 'tpLeft';
+ end;
+ end;
begin
- if FTabPosition = Value then Exit;
+ if FTabPosition = Value then Exit;
- {$IFDEF DEBUGTAB}
+ {$IFDEF DEBUGTAB}
DebugLn('Change TabPosition from %s to %s',[DbgsTabPosition(FTabPosition),DbgsTabPosition(Value)]);
- {$ENDIF}
+ {$ENDIF}
- FTabPosition:=Value;
+ FTabPosition:=Value;
- OrderButtons;
+ OrderButtons;
end;
function TGradTabPagesBar.IsVisible(Index: Integer): Boolean;
@@ -1779,6 +1831,53 @@ begin
{$IFDEF DEBUGTAB} DebugLn('ScrollToTab End'); {$ENDIF}
end;
+procedure TGradTabPagesBar.UpdateAllButtons;
+var
+ i : Integer;
+begin
+ for i:= 0 to FPageList.Count-1 do
+ begin
+ TGradTabPage(FPageList[i]).TabButton.UpdateButton;
+ end;
+end;
+
+procedure TGradTabPagesBar.NewStyle;
+var
+ i : Integer;
+begin
+ for i:= 0 to FPageList.Count-1 do
+ begin
+ with TGradTabPage(FPageList[i]).TabButton do
+ begin
+ FTabControl.Style.PrepareButton(TGradTabPage(FPageList[i]).TabButton);
+ if FTabControl.Style.HasTabButtonPaint then
+ begin
+ OnNormalBackgroundPaint:=@FTabControl.StyleTabButton;
+ OnDisabledBackgroundPaint:=@FTabControl.StyleTabButton;
+ OnDownBackgroundPaint:=@FTabControl.StyleTabButton;
+ OnHotBackgroundPaint:=@FTabControl.StyleTabButton;
+
+ if FTabControl.Style.HasBorderButtonPaint then
+ OnBorderBackgroundPaint := @FTabControl.StyleTabButtonBorder;
+
+ OwnerBackgroundDraw:=true;
+
+ if FTabControl.Style.HasCloseButtonPaint then
+ begin
+ FCloseButton.OnNormalBackgroundPaint := @FTabControl.StyleTabCloseButton;
+ FCloseButton.OnDisabledBackgroundPaint := @FTabControl.StyleTabCloseButton;
+ FCloseButton.OnDownBackgroundPaint := @FTabControl.StyleTabCloseButton;
+ FCloseButton.OnHotBackgroundPaint := @FTabControl.StyleTabCloseButton;
+
+ FCloseButton.OwnerBackgroundDraw := true;
+ end;
+ end else begin
+ OwnerBackgroundDraw:=false;
+ end;
+ end;
+ end;
+end;
+
{-------------------------------------------------------------------------------
TGradTabPagesBar Create(AOwner: TComponent)
------------------------------------------------------------------------------}
@@ -2000,80 +2099,82 @@ end;
------------------------------------------------------------------------------}
constructor TGradTabControl.Create(AOwner: TComponent);
begin
- inherited;
+ inherited;
- FImageChangeLink := TChangeLink.Create;
- FImageChangeLink.OnChange:=@ImageListChange;
+ FImageChangeLink := TChangeLink.Create;
+ FImageChangeLink.OnChange:=@ImageListChange;
- FTabPosition:=tpTop;
- FAutoShowScrollButton:=true;
- fCompStyle := csNoteBook;
+ FTabPosition:=tpTop;
+ FAutoShowScrollButton:=true;
+ fCompStyle := csNoteBook;
- ControlStyle := [{csAcceptsControls, }csDesignInteractive];
- TabStop:=true;
+ ControlStyle := [{csAcceptsControls, }csDesignInteractive];
+ TabStop:=true;
- FPageList := TListWithEvent.Create;
- FTabStrings := TGradTabPages.Create(TListWithEvent(FPageList), Self);
- FPageIndex:=-1;
+ FPageList := TListWithEvent.Create;
+ FTabStrings := TGradTabPages.Create(TListWithEvent(FPageList), Self);
+ FPageIndex:=-1;
- FTabHeight:=20;
+ FTabHeight:=20;
- FPagesPopup := TPopupMenu.Create(Self);
- FPagesPopup.OnPopup:=@PopupTabs;
+ FPagesPopup := TPopupMenu.Create(Self);
+ FPagesPopup.OnPopup:=@PopupTabs;
- FBar := TGradTabBar.Create(Self);
- FBar.Height:=FTabHeight;
- FBar.Top:=0;
- FBar.Left:=0;
- FBar.Width:=Width;
- FBar.Parent := Self;
- //FBar.Align:=alTop;
+ FBar := TGradTabBar.Create(Self);
+ FBar.Height:=FTabHeight;
+ FBar.Top:=0;
+ FBar.Left:=0;
+ FBar.Width:=Width;
+ FBar.Parent := Self;
+ //FBar.Align:=alTop;
- FMoveIncrement:=1;
+ FMoveIncrement:=1;
- FLeftButton := TGradButton.Create(Self);
- FLeftButton.Parent := FBar;
- FLeftButton.Align:= alLeft;
- FLeftButton.Caption:='<';
- FLeftButton.AutoWidth:=true;
- FLeftButton.Visible := false;
- FLeftButton.SetSubComponent(true);
+ FLeftButton := TGradButton.Create(Self);
+ FLeftButton.Parent := FBar;
+ FLeftButton.Align:= alLeft;
+ FLeftButton.Caption:='<';
+ FLeftButton.AutoWidth:=true;
+ FLeftButton.Visible := false;
+ FLeftButton.SetSubComponent(true);
- FRightButton := TGradButton.Create(Self);
- FRightButton.Parent := FBar;
- FRightButton.Align:= alRight;
- FRightButton.Caption:='>';
- FRightButton.AutoWidth:=true;
- FRightButton.Visible:= false;
- FRightButton.SetSubComponent(true);
+ FRightButton := TGradButton.Create(Self);
+ FRightButton.Parent := FBar;
+ FRightButton.Align:= alRight;
+ FRightButton.Caption:='>';
+ FRightButton.AutoWidth:=true;
+ FRightButton.Visible:= false;
+ FRightButton.SetSubComponent(true);
- FPagesBar := TGradTabPagesBar.Create(Self,TListWithEvent(FPageList), Self);
- FPagesBar.Parent:=FBar;
- FPagesBar.Align:=alClient;
- FPagesBar.Left:=0;
- FPagesBar.Top:=0;
- FPagesBar.Width:=FBar.Width;
- FPagesBar.Height:=FBar.Height;
+ FPagesBar := TGradTabPagesBar.Create(Self,TListWithEvent(FPageList), Self);
+ FPagesBar.Parent:=FBar;
+ FPagesBar.Align:=alClient;
+ FPagesBar.Left:=0;
+ FPagesBar.Top:=0;
+ FPagesBar.Width:=FBar.Width;
+ FPagesBar.Height:=FBar.Height;
- AssignEvents(FBar);
- AssignEvents(FPagesBar);
- //AssignEvents(FRightButton);
- //AssignEvents(FLeftButton);
+ AssignEvents(FBar);
+ AssignEvents(FPagesBar);
+ //AssignEvents(FRightButton);
+ //AssignEvents(FLeftButton);
- FLeftButton.OnClick:=@MoveLeftTopClick;
- FRightButton.OnClick:=@MoveRightBottomClick;
+ FLeftButton.OnClick:=@MoveLeftTopClick;
+ FRightButton.OnClick:=@MoveRightBottomClick;
- with FRightButton, FLeftButton do
- begin
- OnMouseUp:=nil;
- OnMouseDown:=nil;
- PopupMenu:=FPagesPopup;
- end;
+ with FRightButton, FLeftButton do
+ begin
+ OnMouseUp:=nil;
+ OnMouseDown:=nil;
+ PopupMenu:=FPagesPopup;
+ end;
- FRightButton.PopupMenu:=FPagesPopup;
+ FRightButton.PopupMenu:=FPagesPopup;
- Height:=200;
- Width:=200;
+ Height:=200;
+ Width:=200;
+
+ FStyle := TGradTabStandardStyle.Create;
end;
{------------------------------------------------------------------------------
@@ -2190,11 +2291,41 @@ begin
FPagesBar.ActiveTabColor:= AValue;
end;
+procedure TGradTabControl.SetCustomDraw(const AValue: Boolean);
+begin
+ if FCustomDraw=AValue then exit;
+ FCustomDraw:=AValue;
+
+ Invalidate;
+end;
+
procedure TGradTabControl.SetNormalTabColor(const AValue: TColor);
begin
FPagesBar.NormalTabColor:=AValue;
end;
+procedure TGradTabControl.SetStyle(const AValue: TGradTabStyleBase);
+begin
+ if FStyle = AValue then Exit;
+ if FStyle <> nil then
+ begin
+ FStyle.Free;
+ FStyle := nil;
+ end;
+
+ FStyle := AValue;
+
+ if FStyle = nil then
+ begin
+ FStyle := TGradTabStandardStyle.Create;
+ end;
+
+ // Update all Tab Paintings
+ InvPaint;
+ PagesBar.NewStyle;
+ PagesBar.UpdateAllButtons;
+end;
+
procedure TGradTabControl.SetTabPopupMenu(const AValue: TPopupMenu);
var
i : Integer;
@@ -2439,13 +2570,13 @@ end;
procedure TGradTabControl.SubMouseClick(Sender: TObject);
begin
if Assigned(OnClick) then
- OnClick(Sender);
+ OnClick(Sender);
end;
procedure TGradTabControl.SubMouseDblClick(Sender: TObject);
begin
- if Assigned(OnDblClick) then
- OnDblClick(Sender);
+ if Assigned(OnDblClick) then
+ OnDblClick(Sender);
end;
procedure TGradTabControl.SubMouseMove(Sender: TObject; Shift: TShiftState; X,
@@ -2468,6 +2599,30 @@ begin
OnDragDrop(Sender, Source, X, Y);
end;
+procedure TGradTabControl.StyleTabButton(Sender: TGradButton;
+ TargetCanvas: TCanvas; R: TRect; BState: TButtonState);
+begin
+ if FStyle.HasTabButtonPaint then
+ FStyle.TabButton(Self, FPageList.IndexOf(Sender.Owner), Sender,
+ TargetCanvas, R, BState);
+end;
+
+procedure TGradTabControl.StyleTabCloseButton(Sender: TGradButton;
+ TargetCanvas: TCanvas; R: TRect; BState: TButtonState);
+begin
+ if FStyle.HasCloseButtonPaint then
+ FStyle.TabCloseButton(Self, FPageList.IndexOf(Sender.Owner), Sender,
+ TargetCanvas, R, BState);
+end;
+
+procedure TGradTabControl.StyleTabButtonBorder(Sender: TGradButton;
+ TargetCanvas: TCanvas; R: TRect; BState: TButtonState);
+begin
+ if FStyle.HasBorderButtonPaint then
+ FStyle.TabButtonBorder(Self, FPageList.IndexOf(Sender.Owner), Sender,
+ TargetCanvas, R, BState);
+end;
+
procedure TGradTabControl.PopupTabs(Sender: TObject);
var
tempMenu : TMenuItem;
@@ -2492,12 +2647,12 @@ end;
procedure TGradTabControl.MoveLeftTopClick(Sender: TObject);
begin
- PagesBar.MoveToPrior;
+ PagesBar.MoveToPrior;
end;
procedure TGradTabControl.MoveRightBottomClick(Sender: TObject);
begin
- PagesBar.MoveToNext;
+ PagesBar.MoveToNext;
end;
{------------------------------------------------------------------------------
@@ -2738,10 +2893,10 @@ end;
------------------------------------------------------------------------------}
procedure TGradTabControl.InvPaint;
begin
- if csDesigning in ComponentState then
- Invalidate
- else
- Paint;
+ if csDesigning in ComponentState then
+ Invalidate
+ else
+ Paint;
end;
{------------------------------------------------------------------------------
@@ -2769,114 +2924,115 @@ end;
------------------------------------------------------------------------------}
procedure TGradTabControl.SetTabPosition(Value : TTabPosition);
var
- tempSize : Integer;
+ tempSize : Integer;
begin
- FTabPosition:=Value;
+ FTabPosition:=Value;
- tempSize:=FTabHeight;
+ tempSize:=FTabHeight;
- {$IFDEF DEBUGTAB}
- DebugLn('TGradTabControl.SetTabPosition Before');
- DebugLn('FBar Left %d Top %d Height %d Width %d',[ FBar.Left, Fbar.Top, FBar.Height, FBar.Width]);
- DebugLn('FPagesBar Left %d Top %d Height %d Width %d',[ FPagesBar.Left, FPagesbar.Top, FPagesBar.Height, FPagesBar.Width]);
- DebugLn('Control Left %d Top %d Height %d Width %d',[ Left, Top, Height, Width]);
- {$ENDIF}
+ {$IFDEF DEBUGTAB}
+ DebugLn('TGradTabControl.SetTabPosition Before');
+ DebugLn('FBar Left %d Top %d Height %d Width %d',[ FBar.Left, Fbar.Top, FBar.Height, FBar.Width]);
+ DebugLn('FPagesBar Left %d Top %d Height %d Width %d',[ FPagesBar.Left, FPagesbar.Top, FPagesBar.Height, FPagesBar.Width]);
+ DebugLn('Control Left %d Top %d Height %d Width %d',[ Left, Top, Height, Width]);
+ {$ENDIF}
- FPagesBar.TabPosition:=Value;
+ FPagesBar.TabPosition:=Value;
- case Value of
- tpTop: begin
- FBar.Height:=FTabHeight;
- FBar.Top:=0;
- FBar.Left:=0;
- FBar.Width:=Width;
- //FBar.Align:=alTop;
- end;
- tpLeft:begin
- FBar.Height:=Height;
- FBar.Top:=0;
- FBar.Left:=0;
- FBar.Width:=GetTabBarSize(tpLeft);
- //FBar.Align:=alLeft;
- end;
- tpBottom:begin
- FBar.Height:=tempSize;
- FBar.Top:=Height-tempSize;
- FBar.Left:=0;
- FBar.Width:=Width;
- //FBar.Align := alBottom;
- end;
- tpRight:begin
- FBar.Left:=Width-GetTabBarSize(tpRight);
- FBar.Top:=0;
- FBar.Height:=Height;
- FBar.Width:=GetTabBarSize(tpRight);
- //FBar.Align:=alRight;
- end;
+ case Value of
+ tpTop: begin
+ FBar.Height:=FTabHeight;
+ FBar.Top:=0;
+ FBar.Left:=0;
+ FBar.Width:=Width;
+ //FBar.Align:=alTop;
end;
-
- //FPagesBar.Align:=alClient;
-
- case Value of
- tpTop: begin
- FLeftButton.Align:=alLeft;
- FLeftButton.RotateDirection:=rdNormal;
- FLeftButton.AutoWidth:=true;
- FLeftButton.AutoHeight:=false;
- FRightButton.Align:=alRight;
- FRightButton.RotateDirection:=rdNormal;
- FRightButton.AutoWidth:=true;
- FRightButton.AutoHeight:=false;
- //FBar.Align:=alTop;
- end;
- tpLeft:begin
- FLeftButton.Align:=alTop;
- FLeftButton.RotateDirection:=rdRight;
- FLeftButton.AutoWidth:=false;
- FLeftButton.AutoHeight:=true;
- FRightButton.Align:=alBottom;
- FRightButton.RotateDirection:=rdRight;
- FRightButton.AutoWidth:=false;
- FRightButton.AutoHeight:=true;
- //FBar.Align:=alLeft;
- end;
- tpBottom:begin
- FLeftButton.Align:=alLeft;
- FLeftButton.RotateDirection:=rdNormal;
- FLeftButton.AutoWidth:=true;
- FLeftButton.AutoHeight:=false;
- FRightButton.Align:=alRight;
- FRightButton.RotateDirection:=rdNormal;
- FRightButton.AutoWidth:=true;
- FRightButton.AutoHeight:=false;
- //FBar.Align := alBottom;
- end;
- tpRight:begin
- FLeftButton.Align:=alTop;
- FLeftButton.RotateDirection:=rdRight;
- FLeftButton.AutoWidth:=false;
- FLeftButton.AutoHeight:=true;
- FRightButton.Align:=alBottom;
- FRightButton.RotateDirection:=rdRight;
- FRightButton.AutoWidth:=false;
- FRightButton.AutoHeight:=true;
- //FBar.Align:=alRight;
- end;
+ tpLeft:begin
+ FBar.Height:=Height;
+ FBar.Top:=0;
+ FBar.Left:=0;
+ FBar.Width:=GetTabBarSize(tpLeft);
+ //FBar.Align:=alLeft;
end;
+ tpBottom:begin
+ FBar.Height:=tempSize;
+ FBar.Top:=Height-tempSize;
+ FBar.Left:=0;
+ FBar.Width:=Width;
+ //FBar.Align := alBottom;
+ end;
+ tpRight:begin
+ FBar.Left:=Width-GetTabBarSize(tpRight);
+ FBar.Top:=0;
+ FBar.Height:=Height;
+ FBar.Width:=GetTabBarSize(tpRight);
+ //FBar.Align:=alRight;
+ end;
+ end;
- if not FPagesBar.IsVisible(FPageIndex) then
- FPagesBar.FocusButton(FPageIndex);
+ //FPagesBar.Align:=alClient;
- {$IFDEF DEBUGTAB}
- DebugLn('TGradTabControl.SetTabPosition After');
- DebugLn('FBar Left %d Top %d Height %d Width %d',[ FBar.Left, Fbar.Top, FBar.Height, FBar.Width]);
- DebugLn('FPagesBar Left %d Top %d Height %d Width %d',[ FPagesBar.Left, FPagesbar.Top, FPagesBar.Height, FPagesBar.Width]);
- DebugLn('Control Left %d Top %d Height %d Width %d',[ Left, Top, Height, Width]);
- {$ENDIF}
+ case Value of
+ tpTop: begin
+ FLeftButton.Align:=alLeft;
+ FLeftButton.RotateDirection:=rdNormal;
+ FLeftButton.AutoWidth:=true;
+ FLeftButton.AutoHeight:=false;
+ FRightButton.Align:=alRight;
+ FRightButton.RotateDirection:=rdNormal;
+ FRightButton.AutoWidth:=true;
+ FRightButton.AutoHeight:=false;
+ //FBar.Align:=alTop;
+ end;
+ tpLeft:begin
+ FLeftButton.Align:=alTop;
+ FLeftButton.RotateDirection:=rdRight;
+ FLeftButton.AutoWidth:=false;
+ FLeftButton.AutoHeight:=true;
+ FRightButton.Align:=alBottom;
+ FRightButton.RotateDirection:=rdRight;
+ FRightButton.AutoWidth:=false;
+ FRightButton.AutoHeight:=true;
+ //FBar.Align:=alLeft;
+ end;
+ tpBottom:begin
+ FLeftButton.Align:=alLeft;
+ FLeftButton.RotateDirection:=rdNormal;
+ FLeftButton.AutoWidth:=true;
+ FLeftButton.AutoHeight:=false;
+ FRightButton.Align:=alRight;
+ FRightButton.RotateDirection:=rdNormal;
+ FRightButton.AutoWidth:=true;
+ FRightButton.AutoHeight:=false;
+ //FBar.Align := alBottom;
+ end;
+ tpRight:begin
+ FLeftButton.Align:=alTop;
+ FLeftButton.RotateDirection:=rdRight;
+ FLeftButton.AutoWidth:=false;
+ FLeftButton.AutoHeight:=true;
+ FRightButton.Align:=alBottom;
+ FRightButton.RotateDirection:=rdRight;
+ FRightButton.AutoWidth:=false;
+ FRightButton.AutoHeight:=true;
+ //FBar.Align:=alRight;
+ end;
+ end;
- AlignPages;
+ if not FPagesBar.IsVisible(FPageIndex) then
+ FPagesBar.FocusButton(FPageIndex);
- InvPaint;
+ {$IFDEF DEBUGTAB}
+ DebugLn('TGradTabControl.SetTabPosition After');
+ DebugLn('FBar Left %d Top %d Height %d Width %d',[ FBar.Left, Fbar.Top, FBar.Height, FBar.Width]);
+ DebugLn('FPagesBar Left %d Top %d Height %d Width %d',[ FPagesBar.Left, FPagesbar.Top, FPagesBar.Height, FPagesBar.Width]);
+ DebugLn('Control Left %d Top %d Height %d Width %d',[ Left, Top, Height, Width]);
+ {$ENDIF}
+
+ AlignPages;
+
+ FPagesBar.UpdateAllButtons;
+ InvPaint;
end;
{------------------------------------------------------------------------------
@@ -2884,10 +3040,10 @@ end;
------------------------------------------------------------------------------}
procedure TGradTabControl.SetLongTabs(Value : Boolean);
begin
- if FLongTabs=Value then Exit;
- FLongTabs:=Value;
+ if FLongTabs=Value then Exit;
+ FLongTabs:=Value;
- SetTabPosition(TabPosition);
+ SetTabPosition(TabPosition);
end;
{------------------------------------------------------------------------------
@@ -2978,46 +3134,8 @@ end;
TGradTabControl Paint
------------------------------------------------------------------------------}
procedure TGradTabControl.Paint;
-var
- AClientRect : TRect;
begin
- Canvas.Brush.Color:=Color;
- Canvas.FillRect(0,0,Width,Height);
-
- Canvas.Pen.Color:=clBlack;
-
- {case FTabPosition of
- tpTop: begin
- Canvas.Line(0,FTabHeight,0,Height);
- Canvas.Line(0,FTabHeight,Width,FTabHeight);
- Canvas.Line(Width-1,FTabHeight,Width-1,Height);
- Canvas.Line(0,Height-1,Width,Height-1);
- end;
- tpBottom: begin
- Canvas.Line(0,0,0,Height-FTabHeight);
- Canvas.Line(0,0,Width,0); //Top
- Canvas.Line(Width-1,0,Width-1,Height-FTabHeight);
- Canvas.Line(0,Height-FTabHeight-1,Width,Height-FTabHeight-1);
- end;
- tpRight: begin
- Canvas.Line(0,0,0,Height); //Left
- Canvas.Line(0,0,Width-GetTabBarSize(tpRight),0); //Top
- Canvas.Line(Width-1-GetTabBarSize(tpRight),0,Width-1-GetTabBarSize(tpRight),Height); //Right
- Canvas.Line(0,Height-1,Width-GetTabBarSize(tpRight),Height-1);//Bottom
- end;
- tpLeft: begin
- Canvas.Line(GetTabBarSize(tpLeft),0,GetTabBarSize(tpLeft),Height); //Left
- Canvas.Line(GetTabBarSize(tpLeft),0,Width,0); //Top
- Canvas.Line(Width-1,0,Width-1,Height); //Right
- Canvas.Line(GetTabBarSize(tpLeft),Height-1,Width,Height-1);//Bottom
- end;
- end;}
-
- AClientRect := GetClientRect;
-
- Canvas.Rectangle(AClientRect.Left-2, AClientRect.Top-2,
- AClientRect.Right+2, AClientRect.Bottom+2);
-
+ FStyle.TabControl(Self, Self.Canvas);
end;
{------------------------------------------------------------------------------
@@ -3025,17 +3143,17 @@ end;
------------------------------------------------------------------------------}
procedure TGradTabControl.Resize;
begin
- inherited;
+ inherited;
- {$IFDEF DEBUGTAB}
- DebugLn('TGradTabControl.Resize HasParent %s FPageList.Count %d',[BoolToStr(HasParent,true), FPageList.Count]);
- {$ENDIF}
+ {$IFDEF DEBUGTAB}
+ DebugLn('TGradTabControl.Resize HasParent %s FPageList.Count %d',[BoolToStr(HasParent,true), FPageList.Count]);
+ {$ENDIF}
- if HasParent and (FPageList.Count<>0) then
- AlignPage(GetCurrentPage, GetClientRect);
+ if HasParent and (FPageList.Count<>0) then
+ AlignPage(GetCurrentPage, GetClientRect);
- case FTabPosition of
+ case FTabPosition of
tpTop: begin
FBar.Width:=Width;
FBar.Top:=0;