Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking on the state of enabled or disabled Labels #637

Open
veggiet opened this issue Apr 23, 2021 · 0 comments
Open

Checking on the state of enabled or disabled Labels #637

veggiet opened this issue Apr 23, 2021 · 0 comments
Labels

Comments

@veggiet
Copy link

veggiet commented Apr 23, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants