Article 56TG3 Tkinter menu: trying to use item label in callback

Tkinter menu: trying to use item label in callback

by
KlaasJan
from LinuxQuestions.org on (#56TG3)
Hello,
In a tkinter app I have a two-level menu with book categories, like Exact - Astronomy
or Music - Classic. The second level is added to the first one with add_cascade.
I want to use the labels of any duo in the appropriate command-callback, without writing them litterally in the callback. So far in my experiments I allways get back the labels of the last duo fed into the gui. I do understand now why. But how to get the labels I clicked on ?
KlaasJanlatest?d=yIl2AUoC8zA latest?i=UeDhmmS1fyc:09yzEqjzsKg:F7zBnMy latest?i=UeDhmmS1fyc:09yzEqjzsKg:V_sGLiP latest?d=qj6IDK7rITs latest?i=UeDhmmS1fyc:09yzEqjzsKg:gIN9vFwUeDhmmS1fyc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments