Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Icon in Statusbar (https://www.delphipraxis.net/91063-icon-statusbar.html)

Tommy1988 28. Apr 2007 16:20


Icon in Statusbar
 
Kann mir wer sagen wie ich ein Icon in eine StatusBar bekomme?

Tommy1988 28. Apr 2007 16:30

Re: Icon in Statusbar
 
genauer:

bei klick auf einen button möchte ich das erste icon einer imagelist in die statusbar laden..

ich weis, diesen thread gibts schon, aber da verstehe ich nix weil als wirr warr ist

cruiser 28. Apr 2007 17:38

Re: Icon in Statusbar
 
Delphi-Quellcode:
// il1 = imagelist
// es ist ein Statusbarpanel angelegt und dessen Eigenschaft
// Style ist auf psOwnerDraw gesetzt

procedure TForm1.stat1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel;
  const Rect: TRect);
begin
  // wir haben evtl. mehrere, also machen wir einen Case-select
  case Panel.Index of
    // Index 0 = erstes Panel
    0: begin
      // image zeichnen
      il1.Draw(StatusBar.Canvas, Rect.Left, Rect.Top, 0);
      // text dazuschreiben
      StatusBar.Canvas.TextOut(Rect.Left + il1.Width + 2 , Rect.Top, Panel.Text);
    end;
  end;
end;
getestet und geht. allerdings gibt es auch für dich eine edit-funktion. du musst nicht nach 10 Minuten pushen.

Luckie 28. Apr 2007 19:54

Re: Icon in Statusbar
 
Zitat:

Zitat von Tommy1988
ich weis, diesen thread gibts schon, aber da verstehe ich nix weil als wirr warr ist

Wie waäre es im entsprechenden Thread zu posten und nachzufragen?


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:14 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz