Главная страница
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.013 c
1-14675
margol
2002-11-25 15:45
2002.12.05
Общее программирование


1-14482
JustNew
2002-11-23 20:21
2002.12.05
парсинг строк


14-14727
Anar
2002-11-12 22:08
2002.12.05
А я сдал экзамен на права...


1-14567
Дмитрий К.К.
2002-11-26 08:16
2002.12.05
Очередной вопрос о создании компонентов в run-time


1-14683
Xsid
2002-11-24 23:22
2002.12.05
Массив компонентов