Hello.
In my application I have main window with buttons, sliders, etc and wxPanel.
Sometimes I open another window (wxFrame) with another wxPanel.
I use GetSize() function of DC to calculate size of picture to draw in wxPanel.
- When I start application, DC.GetSize() returns correct size of wxPanel
- When I open another frame, DC.GetSize() returns corrent size of new, bigger wxPanel
- But then… DC.GetSize() of first wxPanel returns the same size as the big one, even if I close the big one
Both panels are created this way:
self.__panel = wx.Panel(parent, size=size)
(size of first one is smaller than second one)
Then OnPaint:
self.__picture.Draw(wx.PaintDC(self.__panel))
Then in Draw:
dc=wx.BufferedDC(_dc)
viewWidth, viewHeight = dc.GetSize()
I can try to create fully working example of source code which will show this behaviour, but first I wanted to ask, maybe you already see what’s I am doing wrong?
···
–
Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from http://decopter.sf.net