Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

"Flat" TStatusPanel's

Posted on 2002-05-22
9
Medium Priority
?
451 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Expert Comment

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

Accepted Solution

by:
DragonSlayer earned 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

705 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