Solved

"Flat" TStatusPanel's

Posted on 2002-05-22
9
445 Views
Last Modified: 2010-04-04
I need the TStatusPanel's on my TStatusBar to have no border / be flat. In other words for the TStatusBar to look the same as when ones uses SimplePanel = True but have a number of TStatusPanel's.

Is this possible?

Thanks, Tom.
0
Comment
Question by:tomcorcoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 7028950
for each StatusPanel that you create, set its Bevel property to pbNone
0
 

Author Comment

by:tomcorcoran
ID: 7029491
Nice, I didn't spot that. Now however is looks like there  is no StatusBar, just text appearing. I want it to look like when ones uses SimplePanel = True. TStatusBar does not seem to have any bevel/border properties I coud use. I tried embedding it in a TPanel and I couldn't get that to work...maybe I need to play with that again. Any ideas?

Thanks, Tom.
0
 

Author Comment

by:tomcorcoran
ID: 7029532
Nice, I didn't spot that. Now however is looks like there  is no StatusBar, just text appearing. I want it to look like when ones uses SimplePanel = True. TStatusBar does not seem to have any bevel/border properties I coud use. I tried embedding it in a TPanel and I couldn't get that to work...maybe I need to play with that again. Any ideas?

Thanks, Tom.
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Expert Comment

by:shameddragon
ID: 7035185
Is it like this?
StatusBar1.Panels[i].Bevel:=pbNone;
0
 
LVL 14

Accepted Solution

by:
DragonSlayer earned 50 total points
ID: 7038148
well tom, if you really want to embed it in a TPanel, create a Panel on the form, set the Align to alBottom, then while the Panel is still selected, double-click on the statusbar component at the component bar, this will embed the statusbar into the panel. Then, resize the panel appropriately. Set the Panel's BevelOuter to bvLowered.
0
 

Author Comment

by:tomcorcoran
ID: 7041285
Thanks, I tried that exactly. It does not work, setting the statuspanel.bevel to pbNone seems to overwrite the panel's bevel. Can't et it to stay on :-(

Cheers, tom.
0
 
LVL 1

Expert Comment

by:DavidLeeding
ID: 7052647
Here's something you might want to try...haven't tested it properly myself but should work: Try creating the TStatusBar at runtime and setting its parent to be your TPanel (assuming you have one on the form). This embeds it in the TPanel rather than just superimposing it:

uses  ..., ComCtrls, ....
...
var
  sb: TStatusBar;
...

implementation

...

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  sb := TStatusBar.Create(Application);
  with sb do
  begin
    Parent := MyPanel; // Replace MyPanel with the name
                       // of the TPanel you're using
    SizeGrip := False; // This is optional

    // Create the panels...
    for i := 0 to MAX_STATUSBAR_PANELS do
    begin
      Panels.Add;
      Panels[i].Bevel := pbNone;
      // Panels[i].OtherProperty := ...etc etc etc
    end;

    // By default, the status bar will align to the bottom
    // of the TPanel. If this is unsatisfactory, change
    // the alignment to have it behave differently,
    // eg Align := alNone, Top := 47; Left := 0;
    // Width := 470.....etc

    // Now show it..
    Show;

  end;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  sb.Free;
end;

Then you can write to the status bar as you normally would:

  sb.Panels[0].Text := 'Hello world';
  sb.Panels[3].Text := 'yada yada yada';

Hope this helps! (Hope I've understood the problem correctly!!)

0
 

Author Comment

by:tomcorcoran
ID: 7076892
David,

Thanks for that. However is does not work. The statusbar still appears invisible.

Does anyone know how to get that border showing?

Thansk, Tom.
0
 

Author Comment

by:tomcorcoran
ID: 7870188
Time to wind this one up I guess.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question