@mikhail wrote:
Is there a way to pass a value with a button click?
I have a lot of buttons (17) in my form, and all I need them to give me is a specific value.self.WoodButton = forms.Button(Text = 'Wood') self.WoodButton.Click += self.OnWoodButtonClick
its starting to look silty when all that def is doing is this
# Atr button click handler def OnWoodButtonClick(self, sender, e): atrClass = '000' self.AssignAttributes(atrClass)
Away to have something like self.OnWoodButtonClick(000)?
if so, what would it need to look like on the def end as well as on the .Click end, so it doesn’t error out.
Thanks in advance!
Posts: 3
Participants: 2