AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Suche kompo: seti@home progress bar

Ein Thema von Meflin · begonnen am 10. Okt 2004 · letzter Beitrag vom 20. Okt 2004
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#11

Re: Suche kompo: seti@home progress bar

  Alt 11. Okt 2004, 14:35
^^ push ^^ ich gebe nicht auf
  Mit Zitat antworten Zitat
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#12

Re: Suche kompo: seti@home progress bar

  Alt 13. Okt 2004, 18:33
  Mit Zitat antworten Zitat
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#13

Re: Suche kompo: seti@home progress bar

  Alt 16. Okt 2004, 13:00
^^ push ^^
  Mit Zitat antworten Zitat
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#14

Re: Suche kompo: seti@home progress bar

  Alt 19. Okt 2004, 18:36
pushen macht spass, eine antwort wär mir lieber
  Mit Zitat antworten Zitat
supermuckl

Registriert seit: 1. Feb 2003
1.340 Beiträge
 
FreePascal / Lazarus
 
#15

Re: Suche kompo: seti@home progress bar

  Alt 19. Okt 2004, 19:48
wie wärs mit canvas und selber zeichnen ?

schau mal genau hin wie sich das verhält und zerleg dir das in 2D shapes im gehirn

dann mach dir funktionen die die teilbilder zeichnen

und dann verschiebst du nur immer die bereiche usw.. das geht sicherlich einfacher als da jetzt die meisten vermuten
Das echte Leben ist was für Leute...
... die im Internet keine Freunde finden!
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#16

Re: Suche kompo: seti@home progress bar

  Alt 19. Okt 2004, 19:53
Ich würd für sowas auch selbst die Komponente selbst zeichnen, ist ja kein Akt paar Linien auf eine Canvas zu zeichnen und mit ner Farbe zu füllen.
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
sCrAPt
(Gast)

n/a Beiträge
 
#17

Re: Suche kompo: seti@home progress bar

  Alt 19. Okt 2004, 19:58
Ich hab mal so eine ähnliche Progressbar gesehen wo am Ende noch die Prozentzahl herausstand 8) Sowas zu proggen wird dann schon lustiger *fg*

http://www.og4all.de/s.jpg, sCrAPt
  Mit Zitat antworten Zitat
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#18

Re: Suche kompo: seti@home progress bar

  Alt 19. Okt 2004, 21:38
Und die Komponente wurde gefunden (im Anhang)...

in der Unit aus der Zipdatei ist kein "Registercomponents", du musst also die Komponente zur Laufzeit erstellen oder das selbst noch tippen.

Prozentzahl musst du auch extra setzen, ist also nur der pure balken
Angehängte Dateien
Dateityp: zip balkencompo.zip (1,4 KB, 9x aufgerufen)
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  Mit Zitat antworten Zitat
Benutzerbild von Meflin
Meflin

Registriert seit: 21. Aug 2003
4.856 Beiträge
 
#19

Re: Suche kompo: seti@home progress bar

  Alt 20. Okt 2004, 16:43
ok, das ist fast genau das was ich wollte (fehlt noch das von hinten nach vorne sich die einzelnen striche aufbauen und die jeweils von oben nach unten) aber ich denke das sollte mir genügen. folgenden code kann man als vcl komponente installieren:
Delphi-Quellcode:
unit uStatus3DBalken;

interface

uses
  windows, graphics, classes, controls;

type
  TStatus3DBalken = class(TCustomControl)
  private
    fMaxPos: Integer;
    fPos: Integer;
    fLineColor: TColor;
    fBalkenColor1: TColor;
    fBalkenColor2: TColor;
    fBalkenColor3: TColor;
    fTmpPic: TBitmap;
    procedure FDrawBalken;
    procedure FSetColors(AIndex: Integer; AValue: TColor);
    procedure FSetMax(AValue: Integer);
    procedure FSetPos(AValue: Integer);
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Paint; override;
  published
    property BalkenColor1: TColor Index 0 read fBalkenColor1 write FSetColors;
    property BalkenColor2: TColor Index 1 read fBalkenColor2 write FSetColors;
    property BalkenColor3: TColor Index 2 read fBalkenColor3 write FSetColors;
    property LineColor: TColor Index 3 read fLineColor write FSetColors;
    property Color;
    property Doublebuffered;
    property Max: Integer read fMaxPos write FSetMax;
    property Position: Integer read fPos write FSetPos;
    property ParentColor;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Beispiele', [TStatus3DBalken]);
end;

constructor TStatus3DBalken.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  fMaxPos := 100;
  fPos := 25;
  Color := clBlack;
  fLineColor := clSilver;
  fBalkenColor1 := RGB(220, 0, 0);
  fBalkenColor2 := RGB(200, 0, 0);
  fBalkenColor3 := RGB(110, 0, 0);
  fTmpPic := TBitmap.Create;
  SetBounds(Left, Top, 300, 28);
end;

destructor TStatus3DBalken.Destroy;
begin
  fTmpPic.Free;
  inherited Destroy;
end;

procedure TStatus3DBalken.FDrawBalken;
var LCanvas: TCanvas;
    LGesHeight, LGesWidth, LBWidth, LBHeight, LAbstand, LBalkenWidth, LX, LY: Integer;
    LMax, LPos: Integer;
begin
  fTmpPic.Width := Width;
  fTmpPic.Height := Height;
  LCanvas := fTmpPic.Canvas;
  //Hintergrund malen
  LCanvas.Brush.Color := Color;
  LCanvas.FillRect(Rect(0, 0, Width, Height));
  if (Width > 2) and (Height > 2) then
  begin
    LX := 0;
    LY := 0;
    LGesHeight := Height - 1;
    LGesWidth := Width;
    LAbstand := LGesHeight div 3;
    LBHeight := LAbstand * 2;
    LBWidth := LGesWidth - LAbstand - 1;
    LMax := fMaxPos;
    LPos := fPos;
    LBalkenWidth := Round(LPos * (LGesWidth - LAbstand) / LMax);


    //BackgroundLines zeichnen
    LCanvas.Pen.Color := fLineColor;
    LCanvas.MoveTo(LX + LAbstand, 0 + LY);
    LCanvas.LineTo(LX + LAbstand + LBWidth, 0 + LY);
    LCanvas.LineTo(LX + LAbstand + LBWidth, 0 + LBHeight + LY);
    LCanvas.LineTo(LX + LAbstand, 0 + LBHeight + LY);
    LCanvas.LineTo(LX + LAbstand, 0 + LY);

    LCanvas.MoveTo(LX + LAbstand, LBHeight + LY);
    LCanvas.LineTo(LX + LAbstand - (LBHeight div 2), LBHeight + (LBHeight div 2) + LY);
    LCanvas.LineTo(LX + LAbstand + LBWidth - (LBHeight div 2), LBHeight + (LBHeight div 2) + LY);
    LCanvas.LineTo(LX + LAbstand + LBWidth, LBHeight + LY);

    LCanvas.MoveTo(LX + LAbstand, 0 + LY);
    LCanvas.LineTo(LX + LAbstand - (LBHeight div 2), (LBHeight div 2) + LY);
    LCanvas.LineTo(LX + LAbstand - (LBHeight div 2), LBHeight + (LBHeight div 2) + LY);

    if LBalkenWidth > 1 then
    begin
      //Balken zeichnen
      LCanvas.Pen.Color := fBalkenColor1;
      LCanvas.Brush.Color := LCanvas.Pen.Color;
      LCanvas.FillRect(Rect(LX + 1, LAbstand + LY, LX + LBalkenWidth, LAbstand + LBHeight + LY));

      LCanvas.Pen.Color := fBalkenColor2;
      LCanvas.Brush.Color := LCanvas.Pen.Color;
      LCanvas.MoveTo(LX + LBalkenWidth, LAbstand - 1 + LY);
      LCanvas.LineTo(LX + LBalkenWidth + LAbstand - 2, 1 + LY);
      LCanvas.LineTo(LX + LBalkenWidth + LAbstand - 2, LBHeight + LY);
      LCanvas.LineTo(LX + LBalkenWidth, LBHeight + LAbstand - 2 + LY);
      LCanvas.LineTo(LX + LBalkenWidth, LAbstand - 1 + LY);
      LCanvas.FloodFill(LX + LBalkenWidth + 1, LAbstand + LY, LCanvas.Pen.Color, fsBorder);


      LCanvas.Pen.Color := fBalkenColor3;
      LCanvas.Brush.Color := LCanvas.Pen.Color;
      LCanvas.MoveTo(LX + LAbstand + 1, 1 + LY);
      LCanvas.LineTo(LX + LAbstand + LBalkenWidth - 3, 1 + LY);
      LCanvas.LineTo(LX + LBalkenWidth - 1, LAbstand - 1 + LY);
      LCanvas.LineTo(LX + 2, LAbstand - 1 + LY);
      LCanvas.LineTo(LX + LAbstand + 1, 0 + LY);
      if LBalkenwidth > 7 then LCanvas.FloodFill(LX + LAbstand + 1, 2 + LY, LCanvas.Pen.Color, fsBorder);
    end;
  end;
  BitBlt(Canvas.Handle, 0, 0, width, height, LCanvas.Handle, 0, 0, SRCCOPY);
end;

procedure TStatus3DBalken.FSetColors(AIndex: Integer; AValue: TColor);
begin
  if (AIndex = 0) and (AValue <> fBalkenColor1) then
  begin
    fBalkenColor1 := AValue;
    FDrawBalken;
  end else if (AIndex = 1) and (AValue <> fBalkenColor2) then
  begin
    fBalkenColor2 := AValue;
    FDrawBalken;
  end else if (AIndex = 2) and (AValue <> fBalkenColor3) then
  begin
    fBalkenColor3 := AValue;
    FDrawBalken;
  end else if (AIndex = 3) and (AValue <> fLineColor) then
  begin
    fLineColor := AValue;
    FDrawBalken;
  end;
end;

procedure TStatus3DBalken.Paint;
begin
  FDrawBalken;
end;

procedure TStatus3DBalken.FSetMax(AValue: Integer);
begin
  if AValue < 0 then AValue := 0;
  if AValue <> fMaxPos then
  begin
    fMaxPos := AValue;
    if not(fPos < fMaxPos) then Position := fMaxPos;
    FDrawBalken;
  end;
end;

procedure TStatus3DBalken.FSetPos(AValue: Integer);
begin
  if AValue < 0 then AValue := 0 else
  if AValue > fMaxPos then AValue := fMaxPos;
  if (AValue <= fMaxPos) and (AValue <> fPos) then
  begin
    fPos := AValue;
    FDrawBalken;
  end;
end;


end.
ich lasse hier extra offen, sollte noch jemand die exakte kompo finden...
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:19 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz