[wxPython-users] wx.ScrolledPanel and Disable()

Stefano Bartaletti s.bartaletti at dyemagic.com
Mon Feb 18 06:10:32 PST 2008


Alle lunedì 18 febbraio 2008, Stefano Bartaletti ha scritto:
> Hello again,
>
> this time I have code for a ScrolledPanel where I add a bunch of custom
> smaller panels holding a few controls (including NumCtrl from masked lib)
> Each panel subclass is initialized with:
>
> wx.Panel.__init__(self, parent, wx.ID_ANY,
> style=wx.SIMPLE_BORDER|wx.TAB_TRAVERSAL)
>
> This SP is laid on another panel, that Disable()s the SP after creation.
> When the user makes some selection on another panel through a TreeCtrl, I
> catch a Right Click event and rebuild the SP with a function that does: def
> aggiornaDati(self):
> 	self.Freeze()
> 	if len(self.sizerRighe.GetChildren()) > 0:
> 		self.sizerRighe.DeleteWindows()
> 	for magRiga in (x.GetDbItem() for x in self.magazzinaggi):
> 		self.sizerRighe.Add(DdtRientroRiga(self, magRiga), 0,
> wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, 5) self.Layout()
> 	self.Thaw()
>
> on Linux, all the subpanels are correctly drawn in Disabled state, while on
> Windows they look Enabled but they are actually Disabled (see attached
> shots)
>
> wx 2.7.1.1

2.8.7.1, sorry :)

-- 
Cordialmente

Stefano Bartaletti
Responsabile Software

G.Tosi Spa Tintoria

Skype account: stefano.bartaletti
ICQ contact  : 1271960

Viale dell'Industria 61
21052 Busto Arsizio (VA)

Tel. +39 0331 34 48 11
Fax  +39 0331 35 21 23 




More information about the wxpython-users mailing list