How to write and show something on Delphi IDE status bar

user3615169 picture user3615169 · May 8, 2014 · Viewed 11.6k times · Source

I want to know how can I write a module to show something like clock or other thing on Borland Delphi 7 IDE status bar, because I know it's possible but I couldn't find how!

Answer

R.P Silveira picture R.P Silveira · May 9, 2014

To insert a text in a StatusBar, you have to insert a panel first. Just select your statusbar, find the property "Panels" (or perform double click over the statusbar) and click in "Add new". After that, you can write what you want inside the panel in the property "Text" (you can insert one or more panels). To do it programmatically, you can do something like this:

procedure TForm1.Timer1Timer(Sender: TObject);
begin
  StatusBar1.Panels[0].Text := 'Today is: ' + FormatDateTime('dd/mm/yyyy hh:nn:ss', Now);
end;