I am new to wxMathPlot. I am using wxMathPlot 0.1.1 on Windows XP and building with Visual Studio 2005.
I have built and run sample 1 successfully. I then copied that code into my own wxWidgets app that has a parent frame with several child frames for plotting. The plots appear correctly but the mpWindow object does not resize with its frame. I can see no significant difference between my code and the sample except that my frame is not the top level frame.
How can I cause mpWindow to resize with its owning frame please?
Best regards
David
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems this is not a wxMathPlot problem, but a common wxWidget behaviour when setting window layout. Your mpWindow is probably not the only wxWindow you set inside your main frame, so the layout is broken. You probably need to use a sizer, take a look here:
Problem fixed. The plot window now correctly resizes with the frame. All done by the sizer automatically. Not sure where the problem was in my code but I reduced the code and the problem went away.
Thanks for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I am new to wxMathPlot. I am using wxMathPlot 0.1.1 on Windows XP and building with Visual Studio 2005.
I have built and run sample 1 successfully. I then copied that code into my own wxWidgets app that has a parent frame with several child frames for plotting. The plots appear correctly but the mpWindow object does not resize with its frame. I can see no significant difference between my code and the sample except that my frame is not the top level frame.
How can I cause mpWindow to resize with its owning frame please?
Best regards
David
It seems this is not a wxMathPlot problem, but a common wxWidget behaviour when setting window layout. Your mpWindow is probably not the only wxWindow you set inside your main frame, so the layout is broken. You probably need to use a sizer, take a look here:
http://docs.wxwidgets.org/stable/wx_sizeroverview.html#sizeroverview
http://docs.wxwidgets.org/stable/wx_windowsizingoverview.html#windowsizingoverview
Good luck,
CD-RON77
Hi
Thanks for your reply. I am familiar with sizers and used the same code as your example. Guess I need to take another look…
David
Problem fixed. The plot window now correctly resizes with the frame. All done by the sizer automatically. Not sure where the problem was in my code but I reduced the code and the problem went away.
Thanks for your help.