Hello. I have another problem. I don't know how to describe it correctly ->
I have a mpWindow with plot in a wxFrame. When frame changes its size, plot size changes automatically too. It is correct. Also when I maximize the frame using "Maximize" button, everything is correct. But when I maximize it by doubleclicking on frame title, the plot is resized correctly, but its position (understand current values on axis) is zoomed. I must use "Fit" function to correct it.
Normally, I see Y values from 0 to 1. When problem occurs, I see Y values from 0 to 1000000.
I hope it is understandable.
I do not experience that behaviour, at least on my current platform: my axes scale corrctly. Which operating system and compiler do you use?
I have Windows XP, Microsoft Visual Studio 2008. wxWidgets 2.8.9. When I put a breakpoint in onSize event, it shows correct values and scaling is correct then (maybe some delay in debugger causes that it will work correctly).
mpWindow autosizing is done via wxSplitterWindow. But when I was using method via onSize event and manually changed mpWindow size, it was broken too.
I debugged the application and it seems to be because OnMouseLeftRelease event is called when doubleclicking on frame titlebar. Then it will cause improper Fit.
So I've detected the exact cause. It happens when following sequence occurs:
- doubleclick on frame titlebar
- frame will be maximized
- you release mouse button in the time when frame is maximized and the mpWindow is under the mouse cursor
- it will call event OnMouseLeftRelease and it tries to zoom the plot
I'm a newbie here using wxMathPlot,
and I've read that you're able to resize mpWindow frame
when you minimize or maximize your main Frame.
I'd like asking you if you could leave here
a simple code with some lines,
describing how you make these things...
I'm look forward for your reply.
Log in to post a comment.