[Tkinter-discuss] How to define a widget name in a file but create it in another file??
zaazbb
zaazbb at 163.com
Wed Oct 23 05:02:59 CEST 2013
In the Tk demo, you can define a widget name in a subscript file,
but create this widget in the main srcipt file. How to do it in python/tkinter?
here is the Tk code, buttons named in sub file, but create in main file:
in subscript file:
## See Code / Dismiss buttons
set btns [addSeeDismiss $w.buttons $w {} \
{ttk::button $w.buttons.fontchooser -command fontchooserToggle}]
pack $btns -side bottom -fill x
in main script file:
proc addSeeDismiss {w show {vars {}} {extra {}}} {
## See Code / Dismiss buttons
ttk::frame $w
ttk::separator $w.sep
#ttk::frame $w.sep -height 2 -relief sunken
...
}
2013-10-23
zaazbb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20131023/0e63cf0e/attachment.html>
More information about the Tkinter-discuss
mailing list