Einzelnen Beitrag anzeigen

Chris211183

Registriert seit: 19. Sep 2013
Ort: Braunschweig
204 Beiträge
 
Delphi 6 Professional
 
#14

AW: Skala an Komponente

  Alt 12. Nov 2013, 13:26
ne will das ja in meiner Komponente eigenständig haben !


Delphi-Quellcode:
constructor THixBarGraph.Create(AOwner: TComponent);
 ValueMin := 0,0;
 ValueMax := 100,0



procedure THixBarGraph.Paint;
var
   R: TRect;
   Value, ValueMin, ValueMax : Double;
begin
  inherited;
  if (Parent = NIL) or not visible
  then Exit;

  case FKind of

      sbHorizontal : begin
          R := Rect(OffsetUpper,
                   (Height - Barwidth) div 2,
                    Width - OffsetLower,
                    (Height + Barwidth) div 2);
                          if FLabelingStyle = lbsLines
                             then
                                 begin
                                    Canvas.Brush.Color := FColor;
                                    Canvas.FillRect(Rect(0, 0, Width, Height));
                                    Canvas.Brush.Color := FBarColor;
                                    Canvas.FillRect(R);
                                    Frame3D(Canvas, R, clBtnShadow, clBtnHighlight, 1);
                                    Canvas.Pen.Color := clBlack;
                                    Canvas.LineTo();
                                 end;
ich komm nicht weiter, malt mir nix, egal was ich für Koordinaten setzt....
Christian
  Mit Zitat antworten Zitat