Icone no status bar.
Pessoal estou prescisando do código para eu colocar ícone no statusbar , como se fosse no windows..
Wfmzip
Curtidas 0
Respostas
Anfm
23/03/2005
coloque um componente TImage no form com o figura q vc deseja desenhar e sete a propriedade visible dela para False.
No panel do status bar q vc deseja desenhar a imagem, sete a propriedade Style para psOwnerDraw.
No evento OnDrawPanel do Status bar coloque o seguinte código:
[b:e9bf9a5cf5]if[/b:e9bf9a5cf5] Panel = StatusBar1.Panels[2] [b:e9bf9a5cf5]then[/b:e9bf9a5cf5]
[b:e9bf9a5cf5]begin[/b:e9bf9a5cf5]
StatusBar1.Canvas.TextOut( Rect.Left + 3, Rect.Top,´ D.J. System´);
StatusBar1.Canvas.Draw( Rect.Left + 2, Rect.Top, Image1.Picture.Bitmap );
[b:e9bf9a5cf5]end;[/b:e9bf9a5cf5]
No panel do status bar q vc deseja desenhar a imagem, sete a propriedade Style para psOwnerDraw.
No evento OnDrawPanel do Status bar coloque o seguinte código:
[b:e9bf9a5cf5]if[/b:e9bf9a5cf5] Panel = StatusBar1.Panels[2] [b:e9bf9a5cf5]then[/b:e9bf9a5cf5]
[b:e9bf9a5cf5]begin[/b:e9bf9a5cf5]
StatusBar1.Canvas.TextOut( Rect.Left + 3, Rect.Top,´ D.J. System´);
StatusBar1.Canvas.Draw( Rect.Left + 2, Rect.Top, Image1.Picture.Bitmap );
[b:e9bf9a5cf5]end;[/b:e9bf9a5cf5]
GOSTEI 0