View Issue Details

IDProjectCategoryView StatusLast Update
0004073JEDI VCL00 JVCL Componentspublic2007-06-19 08:19
ReporterteejaydubAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.20 
Target VersionFixed in Version3.34 
Summary0004073: TJvColorButton doesn't select current color in dialog
DescriptionMay only happen when the arrow width is 0 (and so the color dialog pops up directly); haven't tried otherwise.

The Color property isn't copied to the ColorDialog before it's shown, so the dialog comes up with Black selected.

Similarly, the custom color list isn't copied back to the ColorButton when the dialog closes, so it's not updated.

My patch, against (old) version 1.22 of the file (problem still there in Subversion revision 10817):

===================================================================
--- C:/TJW/Dev/Springboard/Reuse/Delphi/JvColorButton.pas (revision 390)
+++ C:/TJW/Dev/Springboard/Reuse/Delphi/JvColorButton.pas (revision 391)
@@ -167,12 +167,15 @@
     {$IFDEF VCL}
     ColorDialog.Options := FOptions;
     {$ENDIF VCL}
- OtherBtn.Caption := FOtherCaption;
- ColorDialog.CustomColors.Assign(FCustomColors);
- if ArrowWidth = 0 then
- begin
- if ColorDialog.Execute then
- FColor := ColorDialog.Color;
+ OtherBtn.Caption := FOtherCaption;
+ ColorDialog.Color := FColor;
+ ColorDialog.CustomColors.Assign(FCustomColors);
+ if ArrowWidth = 0 then
+ begin
+ if ColorDialog.Execute then begin
+ FColor := ColorDialog.Color;
+ FCustomColors.Assign(ColorDialog.CustomColors);
+ end;
         MouseUp(mbLeft, [], X, Y);
       end
     else
TagsNo tags attached.

Activities

obones

2007-06-19 08:19

administrator   ~0013456

This is now in SVN. Next time, please try to respect our coding style in your patches.

Issue History

Date Modified Username Field Change
2007-02-28 11:31 teejaydub New Issue
2007-06-19 08:19 obones Status new => resolved
2007-06-19 08:19 obones Fixed in Version => Daily / SVN
2007-06-19 08:19 obones Resolution open => fixed
2007-06-19 08:19 obones Assigned To => obones
2007-06-19 08:19 obones Note Added: 0013456