Javier Castrillo wrote:
Hi, simply I can't make a simple drawing in a window. I googled,
searched but I can't do it anyway.
Did you try the Wiki? Do a title search for "Drawing", and you'll get a bunch of references.
http://wiki.wxpython.org/?action=fullsearch&context=180&value=Drawing&titlesearch=Titles
Here's a short lesson however.
The system sends a "Paint" event whenever the window needs to be re-paninted, so you need to make sure you bind to that event, and paint your window there. In your code, you're drawing to the Window, and then Show()ing it -- when it is shown, it needs to be re-drawn, but you're not doing that. To do that, you need a custom Panel (or Frame, or Window), in which you have bound and handled the paint event.
See enclosed sample.
junk.py (805 Bytes)
ยทยทยท
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov