I have added a button as:
def addButtons(self):
self.buttonBox = Pmw.ButtonBox(self.dataFrame,
labelpos = 'nw',
label_text = '',
frame_borderwidth = 1,
frame_relief = 'groove')
self.buttonBox.pack()
self.buttonBox.place(relx=.75, rely=.750, anchor=W)
# Add some buttons to the ButtonBox.
self.buttonBox.add('Login', command = self.login)
# Set the default button (the one executed when <Return> is hit).
self.buttonBox.setdefault('Login')
self.dataFrame.bind('<Return>', self._processReturnKey)
self.dataFrame.focus_set()
Now, I want to disable login button when user press it. How can i do that? I have found answer for simple button, but this button is in button box.
According to the pmw.ButtonBox documentation, the
addmethod returns a reference to the button that is created. So, just save the reference that it returns and then configure that button like you would any other button.