(self)
Toggle the state for the help list buttons based on list entries.
Toggle the state for the help list buttons based on list entries.
Toggle the state for the help list buttons based on list entries .
def set_add_delete_state(self):
        "Toggle the state for the help list buttons based on list entries."
        if self.helplist.size() < 1:  # No entries in list.
            self.button_helplist_edit.state(('disabled',))
            self.button_helplist_remove.state(('disabled',))
        else:  # Some entries.
            if self.helplist.curselection():  # There currently is a selection.
                self.button_helplist_edit.state(('!disabled',))
                self.button_helplist_remove.state(('!disabled',))
            else:  # There currently is not a selection.
                self.button_helplist_edit.state(('disabled',))
                self.button_helplist_remove.state(('disabled',))
def set_add_delete_state ( self ) : if self . helplist . size ( ) < 1 : # No entries in list. self . button_helplist_edit . state ( ( 'disabled' , ) ) self . button_helplist_remove . state ( ( 'disabled' , ) ) else : # Some entries. if self . helplist . curselection ( ) : # There currently is a selection. self . button_helplist_edit . state ( ( '!disabled' , ) ) self . button_helplist_remove . state ( ( '!disabled' , ) ) else : # There currently is not a selection. self . button_helplist_edit . state ( ( 'disabled' , ) ) self . button_helplist_remove . state ( ( 'disabled' , ) )