Главная страница
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.012 c
14-14755
Slava
2002-11-14 06:31
2002.12.05
А где моя анкета, извините?


14-14766
malkolinge
2002-11-13 14:34
2002.12.05
Интербєйзззз


1-14665
Silentor
2002-11-18 19:21
2002.12.05
Посоветуйте TimerList


3-14427
ALX
2002-11-18 10:31
2002.12.05
Query с параметром


4-14860
DJ LLL
2002-10-23 22:21
2002.12.05
Как закрыть другую прогу?