What is a Megawidget

Purpose: collect information and pointers to what megawidgets are, how to write them, etc.


Occasionally these have been called meta-widgets rather than megawidgets.


A mega widget is NOT an attempt to create new, unique, widgets. Instead, it is an effort to combine existing widgets in ways that are commonly needed (or at the very least interesting to the person who is writing the megawidget). - RS: Note that in contrast to megawatts or megabytes, a megawidget is not worth a million widgets ;-)

Not really knowing too much about the Tk side of things, is a megawidget analogous to a UIPattern? [L1 ]


See also Composite fields megawidgets.

See Adding User Data to Widgets the Megawidget Way.

Steve Uhler's 1996 Tcl workshop presentation slides on the search for the perfect megawidget can be found at http://www.usenix.org/publications/library/proceedings/tcl96/uhler.html

Chengye Mao mailto:[email protected] has a web page which discusses building combined widgets (aka mega widgets) in pure Tcl at http://www.geocities.com/%7Echengye/comb.html .

Creating a BWidget Widget talks about what it takes to write another Bwidget widget - sort of a similar topic. Also see Enhancing BWidget, which talks about how to get more bang out of using bwidget widgets.


escargo 16 Jan 2004 - In a recently modified page, A scrolled frame, it was mentioned that the scrolledframe megawidget, since its used the grid geometry manager, can only be within a parent that also uses the grid geometry manager. What are the ways that a megawidget can be queried to determine which geometry manager it can be used with? Is this an Introspection issue?

ulis, 2005-10-30. For most (all?) megawidgets the parent geometry manager doesn't matter. In the case you mention, a wrapper was built for a megawidget, adding scrollbars at the parent level and using the grid manager for that. This only works if the parent wasn't already using the pack manager. Hence the warning for the use of the wrapper, not for the use of the megawidget.

I think that most megawidgets are isolated inside a frame so you can use them as any normal widget without worrying about the parent geometry manager.


Here are some megawidget frameworks (in other words, code designed to make it easier to build megawidgets). Please add to the following list.