Posted By


airwei on 06/09/12

Tagged


Statistics


Viewed 365 times
Favorited by 0 user(s)

Startus Bar如何能動態新增兩個panels


/ Published in: Delphi
Save to your folder(s)

第一個panel指定放文字,第二個panel指定放非文字(如進度progressBar)


Copy this code and paste it in your HTML
  1. self.StatusBar1.Panels.Clear;
  2.  
  3. self.StatusBar1.Panels.AddItem(nil,0);
  4. self.StatusBar1.Panels[0].Width := trunc(SimpleRoundTo(self.ClientWidth/5)); // 寬度=1/5
  5. self.StatusBar1.Panels[0].Style := psText;
  6.  
  7. self.StatusBar1.Panels.AddItem(nil,1); //給progressBar 用
  8. self.StatusBar1.Panels[1].Style := psOwnerDraw;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.