0

I am new to Python, I am from Android background. Like in Android we can set a value to any widget (that value is not visible) like,

textView.setTag(value)
textView.getTag()

Similarly, is there anything in Python tkinter?

1
  • What is the difference for you between hiding a value in a text widget and deleting it? Commented Sep 2, 2018 at 12:18

1 Answer 1

1

You can set an attribute directly on the widget, and "hide" it there, that should not have adverse consequences:

widget = tk.Frame(root, ...)
widget._my_hidden_value = 42

There is the caveat that nothing is ever really hidden in python... And the question: "why would you need to do that?"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.