Hello,
I have an wxApp based on wxFrame.
How could I set the size of the wxFrame programatically (from a menu for example)?
Thanks,
Mike.
wFrame size Topic is solved
-
- Experienced Solver
- Posts: 50
- Joined: Fri Jul 24, 2009 5:27 pm
- Location: Cluj-Napoca, Romania
Hi!
Let's say you have a button on your frame. This code will change the frame`s dimensions
This SetSize method has more parameters(it's overloaded) so it can be used in other ways. But this is the simplest way to achieve what you need. Read more here http://docs.wxwidgets.org/2.6/wx_wxwind ... dowsetsize
Cheers,
Mihai Paraschivescu
Let's say you have a button on your frame. This code will change the frame`s dimensions
Code: Select all
void MyFrame::WxButton3Click(wxCommandEvent& event)
{
SetSize( 800, 600 );
}
Cheers,
Mihai Paraschivescu
"The Journey Of A Thousand Miles Begins With A Single Step"
-
- Knows some wx things
- Posts: 35
- Joined: Wed Sep 08, 2004 6:22 am