I'm working on a program that diagrams user input on a descendent of
wxPanel. I have an OnPaint event handler and I get the wxPaintDC to
perform the drawing with. The problem I'm having is this. Consider the
following sample:
On Linux, this outputs the actual size of the panel. It also changes as
I resize the window. Under MS Windows, however, it outputs the
resolution of the screen (i.e., 1024x768). Am I using the wrong
function to determine the current size? I'd like to keep the size
determination tied to the DC so I can use the same code for printing as
well as display. If it matters I'm using Python 2.2.1 with wxPython
2.3.2.1 on both platforms. Thanks in advance for your help.
On Linux, this outputs the actual size of the panel. It also changes as
I resize the window. Under MS Windows, however, it outputs the
resolution of the screen (i.e., 1024x768).
I believe this has been fixed for 2.3.3.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
You are correct; that fixed it. Of course, now when I click the "X" on
the window's title bar, I get a Windows error message stating "A
breakpoint has been reached". The dialog has an OK (terminate) and
Cancel (debug) button. Thoughts?
Nathan
···
On Tue, 2002-06-25 at 21:46, Robin Dunn wrote:
> fubar = wxPaintDC (self)
> print fubar.GetSizeTuple()
> event.Skip()
>
> On Linux, this outputs the actual size of the panel. It also changes as
> I resize the window. Under MS Windows, however, it outputs the
> resolution of the screen (i.e., 1024x768).
I believe this has been fixed for 2.3.3.
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
You are correct; that fixed it. Of course, now when I click the "X" on
the window's title bar, I get a Windows error message stating "A
breakpoint has been reached". The dialog has an OK (terminate) and
Cancel (debug) button. Thoughts?
When wxWindows checks for and finds an error condition at runtime it will
show an assert dialog. If the attempt to show the dialog causes another
assert to happen then it will just call trap() which will give you that
message if you are not running within the debugger already. Without the
symbols database you probably won't get any good info if you select the
debug option, but it may show the C call stack and it may be helpful.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!