7-days of FREE Audio papers, translation & more with Prime
7-days of FREE Prime access
7-days of FREE Audio papers, translation & more with Prime
7-days of FREE Prime access
https://doi.org/10.1016/b978-0-12-384717-1.00011-7
Copy DOIJournal: Tcl/Tk | Publication Date: Jan 1, 2012 |
Tk is a package of graphics widgets that provides the tools to build complete graphics applications. Tk supports the usual GUI widgets (such as buttons and menus), complex widgets (such as color and file selectors), and data display widgets (such as an editable text window and an interactive drawing canvas). The Tk widgets are configurable, with default values for most settings. Like most GUI packages, the Tk package is geared toward event-driven programming. All Tcl widget creation commands return the name of the widget they create. A good coding technique is to save that name in a variable and access the widget through that variable rather than hard-coding the widget names in the code. A classic error in event-driven GUI programming is to place a command that modifies the display inside a loop but not to force the display to update. If the event loop is not entered, only the final graphic command is evaluated. The loop will run to completion without modifying the display, and then, suddenly, the display will show the completed image. The Tcl interpreter can be forced to evaluate the event loop with the update command. The default widget configuration options are adequate for most uses. Options can be set when the widget is created with option value pairs, or modified after a widget is created with the widgetName configure command.
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.