Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2002.12.05;
Скачать: CL | DM;

Вниз

OnDrawPanel   Найти похожие ветки 

 
Comp ©   (2002-11-26 15:41) [0]

В чём тут дело?

procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar;
Panel: TStatusPanel; const Rect: TRect);

begin
if panel=Statusbar1.Panels.Items[0] then
begin
StatusBar1.Canvas.Font.Color:=clRed;

StatusBar1.Canvas.TextOut(0,0,"Text");
end;
if panel=Statusbar1.Panels.Items[1] then
begin
StatusBar1.Canvas.Font.Color:=clRed;

StatusBar1.Canvas.TextOut(0,0,"


 
Song ©   (2002-11-26 15:52) [1]

Description

The OnDrawPanel event occurs when a status panel needs to be redisplayed—for example, when the user resizes the status bar. The Rect parameter gives the (new) dimensions of the status panel. OnDrawPanel occurs only if the status panel’s Style property is set to psOwnerDraw.

TDrawPanelEvent is the type of the OnDrawPanel property.
----

Оно?


 
Alx2 ©   (2002-11-26 15:52) [2]

StatusBar1.Canvas.TextRect(Rect,Rect.Left,Rect.Top,"Text");


 
Alx2 ©   (2002-11-26 15:55) [3]


Begin
If Panel = StatusBar1.Panels.Items[0] Then
Begin
StatusBar1.Canvas.Font.Color := clRed;
StatusBar1.Canvas.TextRect(Rect,Rect.Left,Rect.Top,"Text");
End;
If Panel = StatusBar1.Panels.Items[1] Then
Begin
StatusBar1.Canvas.Font.Color := clRed;
StatusBar1.Canvas.TextRect(Rect,Rect.Left,Rect.Top,"Text2");
End;
If Panel = StatusBar1.Panels.Items[2] Then
Begin
StatusBar1.Canvas.Font.Color := clRed;
StatusBar1.Canvas.TextRect(Rect,Rect.Left,Rect.Top,"Text3");
End;

End;


 
Comp ©   (2002-11-27 11:54) [4]

Song

Я знаю, что надо поставить соответствующий стиль панелькам
Только он чё-то не писал в каждой панели, что надо было.
Теперь ясно.




Alex


Спасибо!



Страницы: 1 вся ветка

Текущий архив: 2002.12.05;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.016 c
1-14572
alvin
2002-11-27 08:37
2002.12.05
Реестр в WinAPI


1-14677
Petr2002
2002-11-25 23:26
2002.12.05
Првет народ !


4-14864
dimod
2002-10-21 12:49
2002.12.05
WindowProc - обработка сообщений окна


14-14797
LordOfSilence
2002-11-15 14:06
2002.12.05
Сегодня пятница. Извините, не удержался...


1-14636
Азазелло
2002-11-25 10:32
2002.12.05
Delphi+CR, передача null в качестве параметра..