Statusbar w/right-justified pane

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Statusbar w/right-justified pane

Mark Wilden
What's the best way to have a three-pane statusbar where the center pane
grows with the window size?

This sort of thing is handled natively with SBPS_STRETCH, but it doesn't
seem that StatusBarItem>>width = -1 does the same thing.

I just want to have the usual statusbar with messages/help on the left,
something else in the middle, and CapsLock, elapsed time, etc., in
right-justified panes.


Reply | Threaded
Open this post in threaded view
|

Re: Statusbar w/right-justified pane

Andy Bower
Mark,

> What's the best way to have a three-pane statusbar where the center pane
> grows with the window size?
>
> This sort of thing is handled natively with SBPS_STRETCH, but it doesn't
> seem that StatusBarItem>>width = -1 does the same thing.
>
> I just want to have the usual statusbar with messages/help on the left,
> something else in the middle, and CapsLock, elapsed time, etc., in
> right-justified panes.

Are you sure that width=-1 doesn't work for you? I've just created a
StatusBar in the VC and added three StatusBarItems to it (by double clicking
on the #items aspect. I set the width of the first and last to 50 and left
the width of the centre one at -1. This seems to resize as I would expect
with the centre item growing and shrinking to fill the available space.
Maybe I'm not understanding what you're trying to do?

Best Regards,

Andy Bower
Dolphin Support
http://www.object-arts.com
---
Are you trying too hard?
http://www.object-arts.com/Relax.htm
---


Reply | Threaded
Open this post in threaded view
|

Re: Statusbar w/right-justified pane

Ian Bartholomew-18
Andy,

> Are you sure that width=-1 doesn't work for you? I've just created a
> StatusBar in the VC and added three StatusBarItems to it (by double
> clicking on the #items aspect. I set the width of the first and last
> to 50 and left the width of the centre one at -1. This seems to
> resize as I would expect with the centre item growing and shrinking
> to fill the available space. Maybe I'm not understanding what you're
> trying to do?

That doesn't work that way on my 5.0.3 (using Windows XP) either?.  I
see the left hand item and can make the right hand item visible if I
play around with it's width but there is no sign of the middle item at
all.  If I change the middle one to use a width of 50 as well then all
three appear, so I don't think it's the way I'm testing it.

Perhaps you are using a later version of Dolphin and the behaviour has
changed?.

FWIW, I've just put together a simple addition to 5.0.3 that does give
the desired effect but, as it is probably already redundant, I won't
bother posting it.

--
Ian


Reply | Threaded
Open this post in threaded view
|

Re: Statusbar w/right-justified pane

Mark Wilden
In reply to this post by Andy Bower
"Andy Bower" <[hidden email]> wrote in message
news:[hidden email]...
>
> Are you sure that width=-1 doesn't work for you? I've just created a
> StatusBar in the VC and added three StatusBarItems to it (by double
clicking
> on the #items aspect. I set the width of the first and last to 50 and left
> the width of the centre one at -1. This seems to resize as I would expect
> with the centre item growing and shrinking to fill the available space.
> Maybe I'm not understanding what you're trying to do?

That's what I'm trying to do, all right, and I'm seeing the same results as
Ian (with 5.0.3 and Windows XP).


Reply | Threaded
Open this post in threaded view
|

Re: Statusbar w/right-justified pane

Mark Wilden
In reply to this post by Mark Wilden
"Mark Wilden" <[hidden email]> wrote in message
news:[hidden email]...
>
> This sort of thing is handled natively with SBPS_STRETCH, but it doesn't
> seem that StatusBarItem>>width = -1 does the same thing.

My mistake--I thought stretchable statusbar panes were native to Windows,
but actually, SBPS_STRETCH is MFC (and there's actually quite a bit of code
in MFC's statusbar class).

Ian has kindly sent me changes to dynamically change the width of one pane
based on the sizes of the other panes. This is different to setting the
width to -1 in Windows (which simply makes the pane extend to the right edge
of the statusbar), so it requires a new StatusBarItem aspect: #isAutoResize.

Thanks, Ian!


Reply | Threaded
Open this post in threaded view
|

Re: Statusbar w/right-justified pane

Blair McGlashan
In reply to this post by Mark Wilden
"Mark Wilden" <[hidden email]> wrote in message
news:[hidden email]...
> "Andy Bower" <[hidden email]> wrote in message
> news:[hidden email]...
> >
> > Are you sure that width=-1 doesn't work for you? I've just created a
> > StatusBar in the VC and added three StatusBarItems to it (by double
> clicking
> > on the #items aspect. I set the width of the first and last to 50 and
left
> > the width of the centre one at -1. This seems to resize as I would
expect
> > with the centre item growing and shrinking to fill the available space.
> > Maybe I'm not understanding what you're trying to do?
>
> That's what I'm trying to do, all right, and I'm seeing the same results
as
> Ian (with 5.0.3 and Windows XP).

Yes, Andy was mistakenly testing this out in D6, which does implement that
functionality. D5 does not, as per your experience.

Regards

Blair