Resize a PlotCanvas in a panel

hi to everybody,
I have a class derived by wx.lib.plot, or better PlotCanvas that I don’t succeed
to resizing in the frame using a panel.
I’ve append a simply app to show my scenario.
Could you help to understand me where I am wrong?

regards
beppe

simple_app.py (2 KB)

try changing

s1.Add(self.canvas,0,wx.EXPAND|wx.ALL, 0)

to

s1.Add(self.canvas,1,wx.EXPAND|wx.ALL, 0)
···

On Wednesday, August 13, 2014 8:39:33 AM UTC-7, beppe wrote:

hi to everybody,
I have a class derived by wx.lib.plot, or better PlotCanvas that I don’t succeed
to resizing in the frame using a panel.
I’ve append a simply app to show my scenario.
Could you help to understand me where I am wrong?

regards
beppe

try changing

s1.Add(self.canvas,0,wx.EXPAND|wx.ALL, 0)

to

s1.Add(self.canvas,1,wx.EXPAND|wx.ALL, 0)

nothing…

···

Il giorno mercoledì 13 agosto 2014 18:00:11 UTC+2, Nathan McCorkle ha scritto:


On Wednesday, August 13, 2014 8:39:33 AM UTC-7, beppe wrote:

hi to everybody,
I have a class derived by wx.lib.plot, or better PlotCanvas that I don’t succeed
to resizing in the frame using a panel.
I’ve append a simply app to show my scenario.
Could you help to understand me where I am wrong?

regards
beppe

Hi Beppe,

I used the WIT to figure it out.

See attached, the sizer of the plot needed proportion 1 and expand.

A few suggestions:
- give sizers meaning full names
- don't use wx.PySimpleApp, it is deprecated, just use wx.App or the wit

Werner

plotcanvas.py (2.15 KB)

perfect, thanks a lot of Werne,

p.s.
I have used PySimpleApp for the symple app,
same thing for the sizers
thanks again

···

Il giorno mercoledì 13 agosto 2014 18:25:46 UTC+2, werner ha scritto:

Hi Beppe,

I used the WIT to figure it out.

See attached, the sizer of the plot needed proportion 1 and expand.

A few suggestions:

  • give sizers meaning full names

  • don’t use wx.PySimpleApp, it is deprecated, just use wx.App or the wit

Werner