Version 13 of widget

Updated 2002-12-16 18:42:24

Purpose: describe what the term widget means


A widget is a term used in graphical user interface (GUI) circles in connection to some component of a GUI application. While most widgets have the potential of visual representation, this need not be the case - for instance, container widgets like frames don't actually show up on the screen.

See Tk syntax help for a list of Tk specific commands, most of which are widgets: button - canvas - checkbutton - entry - label - menu - message - radiobutton - scrollbar - text etc. Note that in Tk, one has several ways one can control visual aspects of widgets:

  • externally, via the X resource database
  • at creation time, on the command line
  • later, using the -config option
  • via the option database
  • in some cases, via special objects, like font

[are there other ways of influencing these?]


Some systems call these "controls." I've also heard "gadgets." -- CLN

EE: From The X Window System: Programming And Applications With Xt, OSF/Motif Edition by Douglas A. Young. (First edition, sixth printing, published in 1990):

In addition to widgets, Motif provides a user interface component known as a gadget. Gadgets are identical to widgets, except that they have no window of their own. A gadget must display text or graphics in the window provided by its parent, and must also rely on its parent for input. [...] From the application programmer's viewpoint, gadgets can be used exactly the same way as other display widgets, except for the following restrictions. Gadgets cannot support event handlers, translations, or popup children. Gadgets can support callback functions and have the same appearance as the corresponding widgets.

Widgets are a part of Tk as well as alternatives.


[ Category GUI | Category Data Structure | Category Concept | ]