wxToolbar Sizing on windows 2000
Luca Cappa
luca.cappa at sequoia.it
Tue Jan 22 06:20:25 PST 2008
Hello,
I had the same problem recently (wxToolbar not accounting correctly the
width of the non-"tool button"s, so that the toolbar has shorter than it
should be in the horizontal extension), and I resolved the issue following
the advice given in this thread.
On Fri, 07 Dec 2007 18:12:43 +0100, Julian Smart <julian at anthemion.co.uk>
wrote:
> You can work around it by overriding MyToolBar::DoSetSize; make
> DoSetSize always set the width to the width of its parent (the frame).
I am not sure if I have followed the hint correctly, because it does not
work when the toolbar resides in its own frame, but it does work good when
the toolbar is docked. I simply added this method to all the wxToolbar
derived classes I have in my application.
void seqViewToolbar::DoSetSize (int x, int y, int width, int height, int
sizeFlags)
{
wxToolBar::DoSetSize (x, y, GetParent ()->GetSize ().GetX (), height,
sizeFlags);
}
Any suggestion or error correction would be fine, thanks in advance.
Greetings,
Luca
More information about the wx-users
mailing list