Checking on the state of enabled or disabled Labels
veggiet opened this issue · comments
This could be a bug, an incomplete feature, something I'm doing wrong, who knows!
The basics of what I'm doing, is creating a group of labels, or images, each label or image is clickable with setLabelSubmitFunction
or setImageSubmitFunction
all of this works fine. When I click Submit it sends the text or image to another function.
But now I want to selectively disable labels and reenable them. I use app.disableLabel
or app.disableImage
and it "works" as in it changes the color of the text to gray, and it draws a semi-transparent gray over disabled images. Problem is that the Submit Function still works.
I can not find out how to add a check if app.getLabel(x).state = 'disabled':
I've tried all sorts of searches in the source code, google. Tried to access the tkinter object directly with the inspect module to see if there's a state
value or method and there doesn't seem to be one, which has me befuddled as to how it's figuring out how to display the Label in a disabled appearance or not.
Then I thought: Can I just change the submit function? Turns out Not! setLabelSubmitFunction
seems to only add extra Submit functions... which is a novel thought, but not useful.
At this point my code is long and needs reorganization or I would share a sample.