Here is my code:
for i in posortowane:
z += 20
result = '%s: %s' % (i[0], i[1])
wx.StaticText(panel, -1, result, (345, 125 + z), style=wx.ALIGN_CENTRE)
btn4 = wx.Button(panel, -1, u"Remove", (485, 120 + z))
self.Bind(wx.EVT_BUTTON, self.Rem, btn4)
There are 2 buttons one below the other. They call Rem function:
def Rem(self, i):
print i
I would like to write 'i' from 'posortowane' when I click button. It doesn't work. I tried:
self.Bind(wx.EVT_BUTTON, self.Rem(i), btn4)
but it calls Rem function before I click a button. How can I achieve this? I am sorry for my english. Thank you for any help.