View Issue Details

IDProjectCategoryView StatusLast Update
0003113JEDI VCL00 JVCL Componentspublic2005-08-09 03:29
ReportervladorAssigned Toobones 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0003113: JvXPBar: add BodyFrame color property
DescriptionAs far as I can see, now it is not possible to define body frame color. It would be great if you allow frame width, too.

I can change this for myself, but thought that you might want to add it in the official version.
TagsNo tags attached.

Activities

obones

2005-07-27 01:10

administrator   ~0007625

Well, if you do the changes in your copy and know they work, we would appreciate if you could post them here. A modified version of the latest CVS file would be good, an unified diff (-u3) would even be better.
Cheers
Olivier

vlador

2005-07-27 14:05

reporter   ~0007635

Ah, ok. Sorry not doing it right away. Here is how I have done this:

--- JvXPBar.pas v1.91
+++ JvXPBar.pas new
@@ -315,6 +315,7 @@
     FSeparatorColor: TColor;
     FBorderColor: TColor;
     FOnChange: TNotifyEvent;
+ FBodyBorderColor: TColor;
     procedure SetBorderColor(const Value: TColor);
     procedure SetBodyColor(const Value: TColor);
     procedure SetGradientFrom(const Value: TColor);
@@ -324,6 +325,7 @@
     procedure SetFocusedColor(const Value: TColor);
     procedure SetCheckedFrameColor(const Value: TColor);
     procedure SetFocusedFrameColor(const Value: TColor);
+ procedure SetBodyBorderColor(const Value: TColor);
   public
     constructor Create;
     procedure Assign(Source: TPersistent); override;
@@ -335,6 +337,7 @@
     property CheckedFrameColor: TColor read FCheckedFrameColor write SetCheckedFrameColor default dxColor_CheckedFrameColorXP;
     property FocusedFrameColor: TColor read FFocusedFrameColor write SetFocusedFrameColor default dxColor_FocusedFrameColorXP;
     property BodyColor: TColor read FBodyColor write SetBodyColor default TColor($00F7DFD6);
+ property BodyBorderColor: TColor read FBodyBorderColor write SetBodyBorderColor default TColor($00F7DFD6);
     property GradientFrom: TColor read FGradientFrom write SetGradientFrom default clWhite;
     property GradientTo: TColor read FGradientTo write SetGradientTo default TColor($00F7D7C6);
     property SeparatorColor: TColor read FSeparatorColor write SetSeparatorColor default TColor($00F7D7C6);
@@ -1414,6 +1417,7 @@
   inherited Create;
   // (rom) needs local color constants
   FBodyColor := TColor($00F7DFD6);
+ FBodyBorderColor := TColor($00F7DFD6);
   FBorderColor := clWhite;
   FGradientFrom := clWhite;
   FGradientTo := TColor($00F7D7C6);
@@ -1550,6 +1554,15 @@
   end;
 end;
 
+procedure TJvXPBarColors.SetBodyBorderColor(const Value: TColor);
+begin
+ if FBodyBorderColor <> Value then
+ begin
+ FBodyBorderColor := Value;
+ Change;
+ end;
+end;
+
 //=== { TJvXPCustomWinXPBar } ================================================
 
 constructor TJvXPCustomWinXPBar.Create(AOwner: TComponent);
@@ -2113,8 +2126,14 @@
       if Assigned(FOnDrawBackground) then
         FOnDrawBackground(Self, ACanvas, R);
     end
- else
- ACanvas.FillRect(R);
+ else begin
+ if not FCollapsed and (FColors.FBodyColor <> FColors.FBodyBorderColor) then
+ begin
+ ACanvas.Pen.Color := FColors.FBodyBorderColor;
+ ACanvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom - 1);
+ end
+ else ACanvas.FillRect(R);
+ end;
   end;
 
   procedure DoDrawHeader(ACanvas: TCanvas; var R: TRect);

obones

2005-08-09 03:29

administrator   ~0007704

This is now in CVS, thanks for the report and the diff.

Issue History

Date Modified Username Field Change
2005-07-26 11:31 vlador New Issue
2005-07-27 01:10 obones Note Added: 0007625
2005-07-27 01:10 obones Status new => feedback
2005-07-27 14:05 vlador Note Added: 0007635
2005-08-09 03:29 obones Status feedback => resolved
2005-08-09 03:29 obones Resolution open => fixed
2005-08-09 03:29 obones Assigned To => obones
2005-08-09 03:29 obones Note Added: 0007704