binder and events newbie simple question..

Joan . tontudelbot at gmail.com
Tue Jul 11 11:35:33 PDT 2006


Hi,
i'm a newbie, in programation in general. I'm doing my first program
and i have a simple question:
i have a lot of intctrl's in my frame. i generate them in a loop but
the problem is the binder:
	for n in range(0,9):
		for m in range(0,9):
			casella = 'casella'+str(n)+'x'+str(m)
			casella = wx.lib.intctrl.IntCtrl(parent=self, value=None, min=1,
max=9, id=wx.NewId(), size=(20,20), limited=True, allow_none=True)

here comes the problem. with events and binder:
			self.Bind(event=wx.lib.intctrl.EVT_INT, source=casella,
id=casella.GetId(), handler=caselles(casella))

It must not the correct way... What i wanna is when casella changes
its value, pass a function (caselles) that the argument is casella
(so, not all intctrls' events will do the same, not? correct me if i'm
wrong please..).

Can you help me? Thanks a lot! :D




More information about the wxpython-users mailing list