I had thought of this before. To be more specific, I have a list that will vary every time the GUI loads based on some files in a directory... Anyway, I wanted the GUI to populate menubuttons automatically like this:
proc add_button {mylabel} {
$m add command -label $mylabel -command {...
I am adding menu buttons like this:
set mylabel "Function1"
$m add command -label $mylabel -command {
}
In the command field I need to have code that gets the label name for this button. What I mean is, in this example when I hit the button, I need code that will tell me...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.