L luoshanliang Unregistered / Unconfirmed GUEST, unregistred user! 2002-03-25 #1 如何把statusbar中的几个panel的style都设为psOwnerDraw每个panel都显示不同的内容
T tulipfan Unregistered / Unconfirmed GUEST, unregistred user! 2002-03-25 #2 procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel const Rect: TRect); var g: TIcon; begin g := TIcon.Create; try g.LoadFromFile(Format('%d.ico', [Panel.ID])) // 其中Panel.ID为Panel的序号 StatusBar.Canvas.Draw(Rect.Left,Rect.Top, g); finally g.Free; end; end;
procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel const Rect: TRect); var g: TIcon; begin g := TIcon.Create; try g.LoadFromFile(Format('%d.ico', [Panel.ID])) // 其中Panel.ID为Panel的序号 StatusBar.Canvas.Draw(Rect.Left,Rect.Top, g); finally g.Free; end; end;
L luoshanliang Unregistered / Unconfirmed GUEST, unregistred user! 2002-03-25 #3 TO:tulipfan 我是要同时显示文字和图形,图形我已搞好,
D duckstar Unregistered / Unconfirmed GUEST, unregistred user! 2002-04-11 #4 既然图形都好了,把文字写上去不就是了。 TextOut(Rect.left + 25, Rect.top + 2, '版本 1.0');