Mauro Cavalcanti wrote:
> Well, at least it should! It turns out that the map is correctly
> displayed, but it then fills almost the whole parent window,
> overlapping the left panel where the notebook with the listbox and the
> text control should appear! This illustrates one of the worst (in my
> opinion) things about wxPython, that is the handling of "sizers" to
> correctly place the widgets on an application window.

well, I love sizers -- but they do take a while to wrap your brain around.

Your difficulty probably stems from using a combination of wxGlade and 
handwritten code. Also, I don't know if wxGlade forces you to do it this 
way, but you have a whole bunch of stuff all nested in the Frame, when 
it would be better designed if each component was it's own class.

anyway, I think your problem is:

# ----- UNCOMMENT THE LINES BELOW TO DRAW THE MAP
                #self.figure = Figure(figsize=(10,5))
                #self.canvas = FigureCanvas(self, -1, self.figure)

you've given "self" as the parent of your FigureCanvas, when it needs to 
be parented by the Panel it goes on, which I think is self.PlotPanel, so 
the above line should be:

self.canvas = FigureCanvas(self.PlotPanel, -1, self.figure)



One thing wx does do "wrong" is let you put a control on one parent, 
then Add it to a sizer attached to a different parent -- it should 
probably raise an error when you do that.

-Chris


  --
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

[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to