TGT wrote:Hi,
today I tried to place a gauge into the statusbar. So far no problems, but I wasn't able to position the gauge using the BoxSizer.
I'm not sure that this would be possible. A statusbar can have more than one field and I think adding a sizer to that would not be that best way.
However, I did that catching wxSizeEvents for the frame the statusbar is in, using wxStatusBar::GetFieldRect() and updating the position and size of the gauge that way. This works fine for me as the gauge is only shown when needed, otherwise hidden.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
// (...)
EVT_SIZE( new EventListener( OnSize ) );
}
public void OnSize( object sender, Event e )
{
// do something
}
// (...)
After adding my own EventListener (OnSize in this case) not even one widget is displayed correctly.
Am I forgetting something!?
Positioning the gauge works on this way.... but it seems that the EventHandler stops after my EventListener!?
Tom.
Last edited by TGT on Thu Dec 29, 2005 4:11 pm, edited 1 time in total.