Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    (Delphi 7) Cambiare Colore Testo StatusBar

    Vorrei cambiare colore al testo che compare in questa statusbar come si fa?
    StatusBar.Panels[2].Text:='Email Inviata';
    ho provato con il metodo come si fa con tlabel ma non va.

  2. #2

    ...

    dai un occhiata qui
    ciao!

  3. #3
    ho provato cosi ma dove inserisco le informazioni sul colore?

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    StatusBar1.Panels[0].Style := psOwnerDraw;
    StatusBar1.Panels[1].Style := psOwnerDraw;
    end;

  4. #4
    indichi cio' che vuoi attraverso la procedura StatusBar1DrawPanel:

    codice:
    procedure TStatusForm.StatusBar1DrawPanel(
      StatusBar: TStatusBar;
      Panel: TStatusPanel;
      const Rect: TRect) ;
    begin
      with StatusBar.Canvas do
      begin
        case Panel.Index of
          0: //fist panel
          begin
            Brush.Color := clRed;
            Font.Color := clNavy;
            Font.Style := [fsBold];
          end;
          1: //second panel
          begin
            Brush.Color := clYellow;
            Font.Color := clTeal;
            Font.Style := [fsItalic];
          end;
        end;
        //Panel background color
        FillRect(Rect) ;
    
        //Panel Text
        TextRect(Rect,2 + ImageList1.Width + Rect.Left, 2 + Rect.Top,Panel.Text) ;
      end;
    
      //draw graphics
      ImageList1.Draw(StatusBar1.Canvas, Rect.Left, Rect.Top, Panel.Index) ;
    end;
    ciao!

  5. #5
    Ho fatto in questo modo mi testereste il codice? A me non da risultati cioè non mi colora la StatusBar
    codice:
    procedure TForm1.StatusBarDrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect);
    begin
    with StatusBar.Canvas do
    begin
    case Panel.Index of
         0: //Primo Pannello
    begin
         Brush.Color := clBtnFace;
         Font.Color := clGreen;
         Font.Style := [fsItalic];
    end;
         1: //Secondo Pannello
    begin
         Brush.Color := clBtnFace;
         Font.Color := clGreen;
         Font.Style := [fsItalic];
    end;
         2: //Terzo Pannello
    begin
         Brush.Color := clYellow;
         Font.Color := clRed;
    end;
         3: //second panel
    begin
         Brush.Color := clBtnFace;
         Font.Color := clNavy;
         Font.Style := [fsItalic];
    end;
    end;
    end;
    end;

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.