fixed TColorBox odPainted

git-svn-id: trunk@8655 -
This commit is contained in:
mattias 2006-01-29 00:18:36 +00:00
parent ee58bb2c30
commit 7ba529d123
4 changed files with 124 additions and 93 deletions

View File

@ -7,7 +7,7 @@ object ImageListEditorDlg: TImageListEditorDlg
Constraints.MinHeight = 345 Constraints.MinHeight = 345
Constraints.MinWidth = 520 Constraints.MinWidth = 520
OnCreate = FormCreate OnCreate = FormCreate
PixelsPerInch = 96 PixelsPerInch = 112
Position = poScreenCenter Position = poScreenCenter
HorzScrollBar.Page = 519 HorzScrollBar.Page = 519
VertScrollBar.Page = 344 VertScrollBar.Page = 344
@ -19,7 +19,7 @@ object ImageListEditorDlg: TImageListEditorDlg
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Selected Image' Caption = 'Selected Image'
ClientHeight = 281 ClientHeight = 282
ClientWidth = 214 ClientWidth = 214
TabOrder = 5 TabOrder = 5
Left = 296 Left = 296
@ -33,17 +33,17 @@ object ImageListEditorDlg: TImageListEditorDlg
Color = clNone Color = clNone
ParentColor = False ParentColor = False
Left = 110 Left = 110
Height = 14 Height = 13
Top = 174 Top = 176
Width = 92 Width = 104
end end
object LabelSize: TLabel object LabelSize: TLabel
Color = clNone Color = clNone
ParentColor = False ParentColor = False
Left = 6 Left = 6
Height = 26 Height = 28
Top = 6 Top = 6
Width = 74 Width = 76
end end
object Preview: TScrollBox object Preview: TScrollBox
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
@ -53,16 +53,20 @@ object ImageListEditorDlg: TImageListEditorDlg
TabOrder = 0 TabOrder = 0
OnPaint = PreviewPaint OnPaint = PreviewPaint
HorzScrollBar.Page = 196 HorzScrollBar.Page = 196
VertScrollBar.Page = 127 VertScrollBar.Page = 128
Left = 6 Left = 6
Height = 132 Height = 133
Top = 32 Top = 32
Width = 201 Width = 201
end end
object RadioGroup: TRadioGroup object RadioGroup: TRadioGroup
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
AutoFill = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Adjustment' Caption = 'Adjustment'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousSpaceResize ChildSizing.EnlargeVertical = crsHomogenousSpaceResize
ChildSizing.ShrinkHorizontal = crsScaleChilds ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
@ -80,7 +84,7 @@ object ImageListEditorDlg: TImageListEditorDlg
TabOrder = 1 TabOrder = 1
Left = 6 Left = 6
Height = 105 Height = 105
Top = 170 Top = 171
Width = 96 Width = 96
end end
object ColorBoxTransparent: TColorBox object ColorBoxTransparent: TColorBox
@ -206,7 +210,7 @@ object ImageListEditorDlg: TImageListEditorDlg
OnChange = ColorBoxTransparentClick OnChange = ColorBoxTransparentClick
Left = 110 Left = 110
Height = 24 Height = 24
Top = 195 Top = 196
Width = 96 Width = 96
end end
end end
@ -268,7 +272,7 @@ object ImageListEditorDlg: TImageListEditorDlg
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Images' Caption = 'Images'
ClientHeight = 281 ClientHeight = 282
ClientWidth = 276 ClientWidth = 276
TabOrder = 4 TabOrder = 4
Left = 6 Left = 6
@ -290,7 +294,7 @@ object ImageListEditorDlg: TImageListEditorDlg
OnSelectionChanged = TreeViewSelectionChanged OnSelectionChanged = TreeViewSelectionChanged
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoRowSelect, tvoToolTips] Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoRowSelect, tvoToolTips]
Left = 6 Left = 6
Height = 269 Height = 270
Top = 6 Top = 6
Width = 185 Width = 185
end end
@ -375,6 +379,7 @@ object ImageListEditorDlg: TImageListEditorDlg
top = 246 top = 246
end end
object OpenDialog: TOpenPictureDialog object OpenDialog: TOpenPictureDialog
Filter = 'Graphic (*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp)|*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|Icon (*.ico)|*.ico|Portable PixMap (*.ppm)|*.ppm|Portable GrayMap (*.pgm)|*.pgm|Portable BitMap (*.pbm)|*.pbm|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp|All files (*.*)|*.*|'
Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail, ofAutoPreview] Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail, ofAutoPreview]
Title = 'Open existing file' Title = 'Open existing file'
Filter = 'Graphic (*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp)|*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|Icon (*.ico)|*.ico|Portable PixMap (*.ppm)|*.ppm|Portable GrayMap (*.pgm)|*.pgm|Portable BitMap (*.pbm)|*.pbm|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp|All files (*.*)|*.*|' Filter = 'Graphic (*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp)|*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|Icon (*.ico)|*.ico|Portable PixMap (*.ppm)|*.ppm|Portable GrayMap (*.pgm)|*.pgm|Portable BitMap (*.pbm)|*.pbm|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp|All files (*.*)|*.*|'

View File

@ -5,85 +5,87 @@ LazarusResources.Add('TImageListEditorDlg','FORMDATA',[
+'tnOK'#11'BorderIcons'#11#12'biSystemMenu'#6'biHelp'#0#7'Caption'#6#17'Image' +'tnOK'#11'BorderIcons'#11#12'biSystemMenu'#6'biHelp'#0#7'Caption'#6#17'Image'
+'sList Editor'#12'ClientHeight'#3'Y'#1#11'ClientWidth'#3#8#2#21'Constraints.' +'sList Editor'#12'ClientHeight'#3'Y'#1#11'ClientWidth'#3#8#2#21'Constraints.'
+'MinHeight'#3'Y'#1#20'Constraints.MinWidth'#3#8#2#8'OnCreate'#7#10'FormCreat' +'MinHeight'#3'Y'#1#20'Constraints.MinWidth'#3#8#2#8'OnCreate'#7#10'FormCreat'
+'e'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar' +'e'#13'PixelsPerInch'#2'p'#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar'
+'.Page'#3#7#2#18'VertScrollBar.Page'#3'X'#1#4'Left'#3'9'#1#6'Height'#3'Y'#1#3 +'.Page'#3#7#2#18'VertScrollBar.Page'#3'X'#1#4'Left'#3'9'#1#6'Height'#3'Y'#1#3
+'Top'#3#194#0#5'Width'#3#8#2#0#9'TGroupBox'#9'GroupBoxR'#7'Anchors'#11#5'akT' +'Top'#3#194#0#5'Width'#3#8#2#0#9'TGroupBox'#9'GroupBoxR'#7'Anchors'#11#5'akT'
+'op'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Capti' +'op'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Capti'
+'on'#6#14'Selected Image'#12'ClientHeight'#3#25#1#11'ClientWidth'#3#214#0#8 +'on'#6#14'Selected Image'#12'ClientHeight'#3#26#1#11'ClientWidth'#3#214#0#8
+'TabOrder'#2#5#4'Left'#3'('#1#6'Height'#3'+'#1#3'Top'#2#6#5'Width'#3#218#0#0 +'TabOrder'#2#5#4'Left'#3'('#1#6'Height'#3'+'#1#3'Top'#2#6#5'Width'#3#218#0#0
+#6'TLabel'#16'LabelTransparent'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'Bor' +#6'TLabel'#16'LabelTransparent'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'Bor'
+'derSpacing.Around'#2#6#7'Caption'#6#18'Transparent Color:'#5'Color'#7#6'clN' +'derSpacing.Around'#2#6#7'Caption'#6#18'Transparent Color:'#5'Color'#7#6'clN'
+'one'#11'ParentColor'#8#4'Left'#2'n'#6'Height'#2#14#3'Top'#3#174#0#5'Width'#2 +'one'#11'ParentColor'#8#4'Left'#2'n'#6'Height'#2#13#3'Top'#3#176#0#5'Width'#2
+'\'#0#0#6'TLabel'#9'LabelSize'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left' +'h'#0#0#6'TLabel'#9'LabelSize'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'
+#2#6#6'Height'#2#26#3'Top'#2#6#5'Width'#2'J'#0#0#10'TScrollBox'#7'Preview'#7 +#2#6#6'Height'#2#28#3'Top'#2#6#5'Width'#2'L'#0#0#10'TScrollBox'#7'Preview'#7
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Ar' +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Ar'
+'ound'#2#6#5'Color'#7#10'clGrayText'#11'ParentColor'#8#8'TabOrder'#2#0#7'OnP' +'ound'#2#6#5'Color'#7#10'clGrayText'#11'ParentColor'#8#8'TabOrder'#2#0#7'OnP'
+'aint'#7#12'PreviewPaint'#18'HorzScrollBar.Page'#3#196#0#18'VertScrollBar.Pa' +'aint'#7#12'PreviewPaint'#18'HorzScrollBar.Page'#3#196#0#18'VertScrollBar.Pa'
+'ge'#2''#4'Left'#2#6#6'Height'#3#132#0#3'Top'#2' '#5'Width'#3#201#0#0#0#11 +'ge'#3#128#0#4'Left'#2#6#6'Height'#3#133#0#3'Top'#2' '#5'Width'#3#201#0#0#0
+'TRadioGroup'#10'RadioGroup'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'Border' +#11'TRadioGroup'#10'RadioGroup'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'Auto'
+'Spacing.Around'#2#6#7'Caption'#6#10'Adjustment'#27'ChildSizing.EnlargeVerti' +'Fill'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#10'Adjustment'#28'ChildSi'
+'cal'#7#24'crsHomogenousSpaceResize'#28'ChildSizing.ShrinkHorizontal'#7#14'c' +'zing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSiz'
+'rsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Child' +'ing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.Enlarg'
+'Sizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsP' +'eVertical'#7#24'crsHomogenousSpaceResize'#28'ChildSizing.ShrinkHorizontal'#7
+'erLine'#2#1#7'Enabled'#8#9'ItemIndex'#2#0#13'Items.Strings'#1#6#4'None'#6#7 +#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'C'
+'Stretch'#6#4'Crop'#6#6'Center'#0#7'OnClick'#7#24'ColorBoxTransparentClick'#8 +'hildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Contr'
+'TabOrder'#2#1#4'Left'#2#6#6'Height'#2'i'#3'Top'#3#170#0#5'Width'#2'`'#0#0#9 +'olsPerLine'#2#1#7'Enabled'#8#9'ItemIndex'#2#0#13'Items.Strings'#1#6#4'None'
+'TColorBox'#19'ColorBoxTransparent'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7 +#6#7'Stretch'#6#4'Crop'#6#6'Center'#0#7'OnClick'#7#24'ColorBoxTransparentCli'
+'Enabled'#8#13'Items.Strings'#1#6#7'clBlack'#6#8'clMaroon'#6#7'clGreen'#6#7 +'ck'#8'TabOrder'#2#1#4'Left'#2#6#6'Height'#2'i'#3'Top'#3#171#0#5'Width'#2'`'
+'clOlive'#6#6'clNavy'#6#8'clPurple'#6#6'clTeal'#6#6'clGray'#6#8'clSilver'#6#5 +#0#0#9'TColorBox'#19'ColorBoxTransparent'#7'Anchors'#11#6'akLeft'#8'akBottom'
+'clRed'#6#6'clLime'#6#8'clYellow'#6#6'clBlue'#6#9'clFuchsia'#6#6'clAqua'#6#8 +#0#7'Enabled'#8#13'Items.Strings'#1#6#7'clBlack'#6#8'clMaroon'#6#7'clGreen'#6
+'clLtGray'#6#8'clDkGray'#6#7'clWhite'#6#7'clCream'#6#6'clNone'#6#9'clDefault' +#7'clOlive'#6#6'clNavy'#6#8'clPurple'#6#6'clTeal'#6#6'clGray'#6#8'clSilver'#6
+#6#11'clScrollBar'#6#12'clBackground'#6#15'clActiveCaption'#6#17'clInactiveC' +#5'clRed'#6#6'clLime'#6#8'clYellow'#6#6'clBlue'#6#9'clFuchsia'#6#6'clAqua'#6
+'aption'#6#6'clMenu'#6#8'clWindow'#6#13'clWindowFrame'#6#10'clMenuText'#6#12 +#8'clLtGray'#6#8'clDkGray'#6#7'clWhite'#6#7'clCream'#6#6'clNone'#6#9'clDefau'
+'clWindowText'#6#13'clCaptionText'#6#14'clActiveBorder'#6#16'clInactiveBorde' +'lt'#6#11'clScrollBar'#6#12'clBackground'#6#15'clActiveCaption'#6#17'clInact'
+'r'#6#14'clAppWorkspace'#6#11'clHighlight'#6#15'clHighlightText'#6#9'clBtnFa' +'iveCaption'#6#6'clMenu'#6#8'clWindow'#6#13'clWindowFrame'#6#10'clMenuText'#6
+'ce'#6#11'clBtnShadow'#6#10'clGrayText'#6#9'clBtnText'#6#21'clInactiveCaptio' +#12'clWindowText'#6#13'clCaptionText'#6#14'clActiveBorder'#6#16'clInactiveBo'
+'nText'#6#14'clBtnHighlight'#6#12'cl3DDkShadow'#6#9'cl3DLight'#6#10'clInfoTe' +'rder'#6#14'clAppWorkspace'#6#11'clHighlight'#6#15'clHighlightText'#6#9'clBt'
+'xt'#6#8'clInfoBk'#6#10'clHotLight'#6#23'clGradientActiveCaption'#6#25'clGra' +'nFace'#6#11'clBtnShadow'#6#10'clGrayText'#6#9'clBtnText'#6#21'clInactiveCap'
+'dientInactiveCaption'#6#6'clForm'#6#11'clEndColors'#6#14'clColorDesktop'#6#8 +'tionText'#6#14'clBtnHighlight'#6#12'cl3DDkShadow'#6#9'cl3DLight'#6#10'clInf'
+'cl3DFace'#6#10'cl3DShadow'#6#11'cl3DHiLight'#6#12'clBtnHiLight'#6#12'clFore' +'oText'#6#8'clInfoBk'#6#10'clHotLight'#6#23'clGradientActiveCaption'#6#25'cl'
+'ground'#6#8'clButton'#6#7'clLight'#6#10'clMidlight'#6#6'clDark'#6#5'clMid'#6 +'GradientInactiveCaption'#6#6'clForm'#6#11'clEndColors'#6#14'clColorDesktop'
+#6'clText'#6#12'clBrightText'#6#12'clButtonText'#6#6'clBase'#6#8'clShadow'#6 +#6#8'cl3DFace'#6#10'cl3DShadow'#6#11'cl3DHiLight'#6#12'clBtnHiLight'#6#12'cl'
+#17'clHighlightedText'#6#18'clNormalForeground'#6#14'clNormalButton'#6#13'cl' +'Foreground'#6#8'clButton'#6#7'clLight'#6#10'clMidlight'#6#6'clDark'#6#5'clM'
+'NormalLight'#6#16'clNormalMidlight'#6#12'clNormalDark'#6#11'clNormalMid'#6 +'id'#6#6'clText'#6#12'clBrightText'#6#12'clButtonText'#6#6'clBase'#6#8'clSha'
+#12'clNormalText'#6#18'clNormalBrightText'#6#18'clNormalButtonText'#6#12'clN' +'dow'#6#17'clHighlightedText'#6#18'clNormalForeground'#6#14'clNormalButton'#6
+'ormalBase'#6#18'clNormalBackground'#6#14'clNormalShadow'#6#17'clNormalHighl' +#13'clNormalLight'#6#16'clNormalMidlight'#6#12'clNormalDark'#6#11'clNormalMi'
+'ight'#6#23'clNormalHighlightedText'#6#20'clDisabledForeground'#6#16'clDisab' +'d'#6#12'clNormalText'#6#18'clNormalBrightText'#6#18'clNormalButtonText'#6#12
+'ledButton'#6#15'clDisabledLight'#6#18'clDisabledMidlight'#6#14'clDisabledDa' +'clNormalBase'#6#18'clNormalBackground'#6#14'clNormalShadow'#6#17'clNormalHi'
+'rk'#6#13'clDisabledMid'#6#14'clDisabledText'#6#20'clDisabledBrightText'#6#20 +'ghlight'#6#23'clNormalHighlightedText'#6#20'clDisabledForeground'#6#16'clDi'
+'clDisabledButtonText'#6#14'clDisabledBase'#6#20'clDisabledBackground'#6#16 +'sabledButton'#6#15'clDisabledLight'#6#18'clDisabledMidlight'#6#14'clDisable'
+'clDisabledShadow'#6#19'clDisabledHighlight'#6#25'clDisabledHighlightedText' +'dDark'#6#13'clDisabledMid'#6#14'clDisabledText'#6#20'clDisabledBrightText'#6
+#6#18'clActiveForeground'#6#14'clActiveButton'#6#13'clActiveLight'#6#16'clAc' +#20'clDisabledButtonText'#6#14'clDisabledBase'#6#20'clDisabledBackground'#6
+'tiveMidlight'#6#12'clActiveDark'#6#11'clActiveMid'#6#12'clActiveText'#6#18 +#16'clDisabledShadow'#6#19'clDisabledHighlight'#6#25'clDisabledHighlightedTe'
+'clActiveBrightText'#6#18'clActiveButtonText'#6#12'clActiveBase'#6#18'clActi' +'xt'#6#18'clActiveForeground'#6#14'clActiveButton'#6#13'clActiveLight'#6#16
+'veBackground'#6#14'clActiveShadow'#6#17'clActiveHighlight'#6#23'clActiveHig' +'clActiveMidlight'#6#12'clActiveDark'#6#11'clActiveMid'#6#12'clActiveText'#6
+'hlightedText'#0#9'MaxLength'#2#0#7'Palette'#7#6'cpFull'#11'ParentColor'#8#8 +#18'clActiveBrightText'#6#18'clActiveButtonText'#6#12'clActiveBase'#6#18'clA'
+'TabOrder'#2#2#4'Text'#6#9'clFuchsia'#8'OnChange'#7#24'ColorBoxTransparentCl' +'ctiveBackground'#6#14'clActiveShadow'#6#17'clActiveHighlight'#6#23'clActive'
+'ick'#4'Left'#2'n'#6'Height'#2#24#3'Top'#3#195#0#5'Width'#2'`'#0#0#0#7'TBitB' +'HighlightedText'#0#9'MaxLength'#2#0#7'Palette'#7#6'cpFull'#11'ParentColor'#8
+'tn'#5'BtnOK'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around' +#8'TabOrder'#2#2#4'Text'#6#9'clFuchsia'#8'OnChange'#7#24'ColorBoxTransparent'
+#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#4'Kind'#7#4'bkOK' +'Click'#4'Left'#2'n'#6'Height'#2#24#3'Top'#3#196#0#5'Width'#2'`'#0#0#0#7'TBi'
+#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#0#4'Left'#3#199#0#6'Heig' +'tBtn'#5'BtnOK'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Arou'
+'ht'#2#25#3'Top'#3'9'#1#5'Width'#2'K'#0#0#7'TBitBtn'#9'BtnCancel'#7'Anchors' +'nd'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#4'Kind'#7#4'b'
+#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#2#6'Cancel'#9#7 +'kOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#0#4'Left'#3#199#0#6
,'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs' ,'Height'#2#25#3'Top'#3'9'#1#5'Width'#2'K'#0#0#7'TBitBtn'#9'BtnCancel'#7'Anch'
+#2#0#8'TabOrder'#2#1#4'Left'#3#23#1#6'Height'#2#25#3'Top'#3'9'#1#5'Width'#2 +'ors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#2#6'Cancel'
+'K'#0#0#7'TBitBtn'#8'BtnApply'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'Bor' +#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGly'
+'derSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6'&Ap' +'phs'#2#0#8'TabOrder'#2#1#4'Left'#3#23#1#6'Height'#2#25#3'Top'#3'9'#1#5'Widt'
+'ply'#9'NumGlyphs'#2#0#7'OnClick'#7#13'btnApplyClick'#8'TabOrder'#2#2#4'Left' +'h'#2'K'#0#0#7'TBitBtn'#8'BtnApply'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20
+#3'g'#1#6'Height'#2#25#3'Top'#3'9'#1#5'Width'#2'K'#0#0#7'TBitBtn'#7'BtnHelp' +'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6
+#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#25'Bord' +'&Apply'#9'NumGlyphs'#2#0#7'OnClick'#7#13'btnApplyClick'#8'TabOrder'#2#2#4'L'
+'erSpacing.InnerBorder'#2#2#7'Caption'#6#5'&Help'#4'Kind'#7#6'bkHelp'#9'NumG' +'eft'#3'g'#1#6'Height'#2#25#3'Top'#3'9'#1#5'Width'#2'K'#0#0#7'TBitBtn'#7'Btn'
+'lyphs'#2#0#8'TabOrder'#2#3#4'Left'#3#183#1#6'Height'#2#25#3'Top'#3'9'#1#5'W' +'Help'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#25
+'idth'#2'K'#0#0#9'TGroupBox'#9'GroupBoxL'#7'Anchors'#11#5'akTop'#6'akLeft'#8 +'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#5'&Help'#4'Kind'#7#6'bkHelp'#9
+'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#6'Images'#12'ClientHe' +'NumGlyphs'#2#0#8'TabOrder'#2#3#4'Left'#3#183#1#6'Height'#2#25#3'Top'#3'9'#1
+'ight'#3#25#1#11'ClientWidth'#3#20#1#8'TabOrder'#2#4#4'Left'#2#6#6'Height'#3 +#5'Width'#2'K'#0#0#9'TGroupBox'#9'GroupBoxL'#7'Anchors'#11#5'akTop'#6'akLeft'
+'+'#1#3'Top'#2#6#5'Width'#3#24#1#0#9'TTreeView'#8'TreeView'#7'Anchors'#11#5 +#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#6'Images'#12'Client'
+'Height'#3#26#1#11'ClientWidth'#3#20#1#8'TabOrder'#2#4#4'Left'#2#6#6'Height'
+#3'+'#1#3'Top'#2#6#5'Width'#3#24#1#0#9'TTreeView'#8'TreeView'#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#17'D' +'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#17'D'
+'efaultItemHeight'#2#16#13'HideSelection'#8#6'Images'#7#9'ImageList'#9'RowSe' +'efaultItemHeight'#2#16#13'HideSelection'#8#6'Images'#7#9'ImageList'#9'RowSe'
+'lect'#9#11'ShowButtons'#8#9'ShowLines'#8#8'ShowRoot'#8#8'TabOrder'#2#0#10'O' +'lect'#9#11'ShowButtons'#8#9'ShowLines'#8#8'ShowRoot'#8#8'TabOrder'#2#0#10'O'
+'nDeletion'#7#16'TreeViewDeletion'#18'OnSelectionChanged'#7#24'TreeViewSelec' +'nDeletion'#7#16'TreeViewDeletion'#18'OnSelectionChanged'#7#24'TreeViewSelec'
+'tionChanged'#7'Options'#11#17'tvoAutoItemHeight'#21'tvoKeepCollapsedNodes' +'tionChanged'#7'Options'#11#17'tvoAutoItemHeight'#21'tvoKeepCollapsedNodes'
+#12'tvoRowSelect'#11'tvoToolTips'#0#4'Left'#2#6#6'Height'#3#13#1#3'Top'#2#6#5 +#12'tvoRowSelect'#11'tvoToolTips'#0#4'Left'#2#6#6'Height'#3#14#1#3'Top'#2#6#5
+'Width'#3#185#0#0#0#7'TButton'#6'BtnAdd'#7'Anchors'#11#5'akTop'#7'akRight'#0 +'Width'#3#185#0#0#0#7'TButton'#6'BtnAdd'#7'Anchors'#11#5'akTop'#7'akRight'#0
+#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6 +#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6
+#6'Add...'#7'Default'#9#7'OnClick'#7#11'BtnAddClick'#8'TabOrder'#2#1#4'Left' +#6'Add...'#7'Default'#9#7'OnClick'#7#11'BtnAddClick'#8'TabOrder'#2#1#4'Left'
@ -106,16 +108,20 @@ LazarusResources.Add('TImageListEditorDlg','FORMDATA',[
+'Caption'#6#7'Save...'#7'OnClick'#7#12'BtnSaveClick'#8'TabOrder'#2#6#4'Left' +'Caption'#6#7'Save...'#7'OnClick'#7#12'BtnSaveClick'#8'TabOrder'#2#6#4'Left'
+#3#196#0#6'Height'#2#25#3'Top'#3#161#0#5'Width'#2'K'#0#0#0#10'TImageList'#9 +#3#196#0#6'Height'#2#25#3'Top'#3#161#0#5'Width'#2'K'#0#0#0#10'TImageList'#9
+'ImageList'#4'left'#3#216#0#3'top'#3#246#0#0#0#18'TOpenPictureDialog'#10'Ope' +'ImageList'#4'left'#3#216#0#3'top'#3#246#0#0#0#18'TOpenPictureDialog'#10'Ope'
+'nDialog'#7'Options'#11#18'ofAllowMultiSelect'#15'ofFileMustExist'#14'ofEnab' +'nDialog'#6'Filter'#12'2'#1#0#0'Graphic (*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm'
+'leSizing'#12'ofViewDetail'#13'ofAutoPreview'#0#5'Title'#6#18'Open existing ' +';*.bmp)|*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|Icon (*.ico)|*.ico|Portab'
+'file'#6'Filter'#12'2'#1#0#0'Graphic (*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.' +'le PixMap (*.ppm)|*.ppm|Portable GrayMap (*.pgm)|*.pgm|Portable BitMap (*.p'
+'bmp)|*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|Icon (*.ico)|*.ico|Portable ' +'bm)|*.pbm|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitma'
+'PixMap (*.ppm)|*.ppm|Portable GrayMap (*.pgm)|*.pgm|Portable BitMap (*.pbm)' +'ps (*.bmp)|*.bmp|All files (*.*)|*.*|'#7'Options'#11#18'ofAllowMultiSelect'
+'|*.pbm|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps ' +#15'ofFileMustExist'#14'ofEnableSizing'#12'ofViewDetail'#13'ofAutoPreview'#0
+'(*.bmp)|*.bmp|All files (*.*)|*.*|'#11'FilterIndex'#2#0#5'Title'#6#18'Open ' +#5'Title'#6#18'Open existing file'#6'Filter'#12'2'#1#0#0'Graphic (*.ico;*.pp'
+'existing file'#4'left'#3#216#0#3'top'#3#209#0#0#0#18'TSavePictureDialog'#10 +'m;*.pgm;*.pbm;*.png;*.xpm;*.bmp)|*.ico;*.ppm;*.pgm;*.pbm;*.png;*.xpm;*.bmp|'
+'SaveDialog'#6'Filter'#6#20'Pixmap (*.xpm)|*.xpm'#7'Options'#11#14'ofEnableS' +'Icon (*.ico)|*.ico|Portable PixMap (*.ppm)|*.ppm|Portable GrayMap (*.pgm)|*'
+'izing'#12'ofViewDetail'#13'ofAutoPreview'#0#5'Title'#6#12'Save file as'#6'F' +'.pgm|Portable BitMap (*.pbm)|*.pbm|Portable Network Graphic (*.png)|*.png|P'
+'ilter'#6#20'Pixmap (*.xpm)|*.xpm'#11'FilterIndex'#2#0#5'Title'#6#12'Save fi' +'ixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp|All files (*.*)|*.*|'#11'FilterIn'
+'le as'#4'left'#3#252#0#3'top'#3#209#0#0#0#0 +'dex'#2#0#5'Title'#6#18'Open existing file'#4'left'#3#216#0#3'top'#3#209#0#0
+#0#18'TSavePictureDialog'#10'SaveDialog'#6'Filter'#6#20'Pixmap (*.xpm)|*.xpm'
+#7'Options'#11#14'ofEnableSizing'#12'ofViewDetail'#13'ofAutoPreview'#0#5'Tit'
+'le'#6#12'Save file as'#6'Filter'#6#20'Pixmap (*.xpm)|*.xpm'#11'FilterIndex'
+#2#0#5'Title'#6#12'Save file as'#4'left'#3#252#0#3'top'#3#209#0#0#0#0
]); ]);

View File

@ -86,6 +86,9 @@ type
FImageList: TImageList; FImageList: TImageList;
FModified: Boolean; FModified: Boolean;
FPreviewBmp: TBitmap; FPreviewBmp: TBitmap;
ColorStrings: TSTrings;
procedure FillColorBoxTransparent;
procedure AddItemToColorBox(const s: string);
public public
procedure LoadFromImageList(AImageList: TImageList); procedure LoadFromImageList(AImageList: TImageList);
procedure SaveToImageList; procedure SaveToImageList;
@ -176,6 +179,8 @@ begin
OpenDialog.Title := sccsILEdtOpenDialog; OpenDialog.Title := sccsILEdtOpenDialog;
SaveDialog.Title := sccsILEdtSaveDialog; SaveDialog.Title := sccsILEdtSaveDialog;
FillColorBoxTransparent;
end; end;
procedure TImageListEditorDlg.BtnAddClick(Sender: TObject); procedure TImageListEditorDlg.BtnAddClick(Sender: TObject);
@ -396,6 +401,20 @@ begin
end; end;
end; end;
procedure TImageListEditorDlg.FillColorBoxTransparent;
begin
ColorStrings:=TStringList.Create;
GetColorValues(@AddItemToColorBox);
ColorBoxTransparent.Items.Assign(ColorStrings);
ColorStrings.Free;
ColorStrings:=nil;
end;
procedure TImageListEditorDlg.AddItemToColorBox(const s: string);
begin
ColorStrings.Add(s);;
end;
procedure TImageListEditorDlg.LoadFromImageList(AImageList: TImageList); procedure TImageListEditorDlg.LoadFromImageList(AImageList: TImageList);
var var
I, C: Integer; I, C: Integer;

View File

@ -25,8 +25,8 @@ unit ColorBox;
interface interface
uses uses
LResources, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, LResources, SysUtils, LCLProc, LCLType, Classes, Graphics, Controls, Forms,
StdCtrls; Dialogs, StdCtrls;
type type
TColorPalette = (cpDefault, cpFull); TColorPalette = (cpDefault, cpFull);
@ -36,7 +36,6 @@ type
FPalette: TColorPalette; FPalette: TColorPalette;
function GetSelection: TColor; function GetSelection: TColor;
procedure SetSelection(Value: TColor); procedure SetSelection(Value: TColor);
procedure SetPalette(Value: TColorPalette); procedure SetPalette(Value: TColorPalette);
protected protected
procedure SetStyle(Value: TComboBoxStyle); override; procedure SetStyle(Value: TComboBoxStyle); override;
@ -214,6 +213,7 @@ begin
r.bottom := Rect.bottom - 3; r.bottom := Rect.bottom - 3;
r.left := Rect.left + 3; r.left := Rect.left + 3;
r.right := r.left + 14; r.right := r.left + 14;
Exclude(State,odPainted);
with Canvas do begin with Canvas do begin
FillRect(Rect); FillRect(Rect);
@ -233,6 +233,7 @@ begin
r := Rect; r := Rect;
r.left := r.left + 20; r.left := r.left + 20;
//DebugLn('TColorBox.DrawItem ',dbgs(Index),' ',dbgs(r),' ',dbgs(odPainted in State),' ',dbgs(Assigned(OndrawItem)));
inherited DrawItem(Index, r, State); inherited DrawItem(Index, r, State);
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------