Browse Source

Merge pull request #249 from sganz/dev-bgracontrols

Added missing OnDblClick to ProgressBars
Leandro Oscar Ezequiel Diaz 5 months ago
parent
commit
4ea0d708c7
3 changed files with 21 additions and 0 deletions
  1. 3 0
      bcradialprogressbar.pas
  2. 4 0
      bgraflashprogressbar.pas
  3. 14 0
      bgrashape.pas

+ 3 - 0
bcradialprogressbar.pas

@@ -3,6 +3,8 @@
 - Edivando S. Santos Brasil | [email protected]
   (Compatibility with delphi VCL 11/2018)
 
+- Sandy Ganz ([email protected])
+    2025-07  Added Missing OnDblClick event property
 ***************************** END CONTRIBUTOR(S) *****************************}
 unit BCRadialProgressBar;
 
@@ -68,6 +70,7 @@ type
     property MaxValue: integer read FMaxValue write SetMaxValue default 100;
     property Value: integer read FValue write SetValue default 0;
     property OnClick;
+    property OnDblClick;
     property OnMouseDown;
     property OnMouseEnter;
     property OnMouseLeave;

+ 4 - 0
bgraflashprogressbar.pas

@@ -24,6 +24,9 @@
              Added ShowBarAnimation
     2025-02  Added use of Font.Color
     2025-03  Added MarqueeWidthType
+
+- Sandy Ganz ([email protected])
+    2025-07  Added Missing OnDblClick event property
 ***************************** END CONTRIBUTOR(S) *****************************}
 unit BGRAFlashProgressBar;
 
@@ -248,6 +251,7 @@ type
     property GraphYLineDigits: Integer read FGraphYLineDigits write SetGraphYLineDigits default 0;
 
     property OnClick;
+    property OnDblClick;
     property OnMouseDown;
     property OnMouseEnter;
     property OnMouseLeave;

+ 14 - 0
bgrashape.pas

@@ -13,6 +13,9 @@
 - Edivando S. Santos Brasil | [email protected]
   (Compatibility with delphi VCL 11/2018)
 
+- Sandy Ganz ([email protected])
+    2025-07  Added capture for Fill and Border Gradient property changes so
+             repaint will happen.
 ***************************** END CONTRIBUTOR(S) *****************************}
 unit BGRAShape;
 
@@ -69,6 +72,8 @@ type
   protected
     { Protected declarations }
     procedure Paint; override;
+    procedure DoChangeGradient(ASender: TObject; AData: PtrInt);
+
   public
     { Public declarations }
     constructor Create(AOwner: TComponent); override;
@@ -135,6 +140,13 @@ end;
 
 { TBGRAShape }
 
+// Added to catch any TBCGradient changes for Border and Fill Gradient objects
+
+procedure TBGRAShape.DoChangeGradient(ASender: TObject; AData: PtrInt);
+begin
+  Invalidate;
+end;
+
 procedure TBGRAShape.SetBorderColor(const AValue: TColor);
 begin
   if FBorderColor = AValue then
@@ -397,10 +409,12 @@ begin
   FBorderGradient.Point2XPercent := 100;
   FBorderGradient.StartColor := clWhite;
   FBorderGradient.EndColor := clBlack;
+  FBorderGradient.OnChange := DoChangeGradient;
 
   FFillColor := clWindow;
   FFillOpacity := 255;
   FFillGradient := TBCGradient.Create(Self);
+  FFillGradient.OnChange := DoChangeGradient;
 
   FRoundRadius := 0;
   FSideCount := 4;