Fórum Mudar Cor de Fundo do Panel na Status Bar #352600
28/01/2008
0
Já procurei aqui no fórum, mas o q achei, testei e não funcionou.
Estou tentando fazer assim:
procedure TFmPrincipal.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); begin with StatusBar1.Canvas do if Panel.Index = 1 then begin font.Color:=clred; end; end;
Só q assim nem a cor da fonte muda nem o texto q ta no panel aparece, como faço isso então? Se não der pra mudar a cor do panel, queria ao menos mudar a cor da fonte.
Qualquer ajuda será bem vinda.
desde já agradeço.
Att
Dalton
Dbergkamps10
Curtir tópico
+ 0Posts
28/01/2008
Vitor Alcantara
Gostei + 0
28/01/2008
Dbergkamps10
Esqueci de colocar no post q ja tinha mudado este propriedade. :wink:
Mesmo assim nada acontece.
Att
Datlon
Gostei + 0
28/01/2008
Vitor Alcantara
Olha ai um exemplo que utilizo em minha aplicação, funciona beleza.
procedure TFormPrincipal.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect); begin with StatusBar1.Canvas do begin FillRect(Rect); //Definir Font e Style Font.Name := ´Verdana´; Font.Color := ClBlack; //Font.Style := [FsBold]; //Escreve o texto em cada panel if Panel.Index = 0 then begin Font.Color := clBlue; //ImageList1.Draw(StatusBar1.Canvas,Rect.Left+5,Rect.Top+1,3); TextOut(Rect.Left +25, Rect.Top + 1,Panel.Text); end; if Panel.Index = 1 then Begin Font.Color := ClRed; TextOut(Rect.Left +1 , Rect.Top + 1, Panel.Text); end; if Panel.Index = 2 then Begin //ImageList1.Draw(StatusBar1.Canvas,Rect.Left+5,Rect.Top+1,4); TextOut(Rect.Left+25 , Rect.Top + 1,Panel.Text); end; if Panel.Index = 3 then Begin //ImageList1.Draw(StatusBar1.Canvas,Rect.Left+5,Rect.Top+1,5); TextOut(Rect.Left+25 , Rect.Top + 1,Panel.Text); end; end; end;
Gostei + 0
28/01/2008
Dbergkamps10
Vlw Vitor, funcionou blz!!!!!!! :D :D :D :D
Como eu e um amigo meu dizemos, essa é pra guardar em nossos corações.
Obrigado e até +...
Att
Dalton
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)