Next Previous Up Top Contents Index

8 DUIM-Gadgets Library

8.7 Collection gadgets

A collection gadget is any gadget whose items may themselves form a Dylan collection. Often, a collection gadget is used to group together a number other gadgets, such as buttons, in such a way that the functionality of those gadgets is connected in some way. For example, a <radio-box> is a collection of radio buttons connected in such a way that only one of the buttons can be selected at any time (as is the standard behavior for a group of radio buttons). The items contained in a collection gadget are expressed using the gadget-items slot.

Note that collection gadgets are not defined as collections of other gadgets, even though this might be a convenient way to think of them. When defining a collection gadget, you give the gadget-items slot a standard Dylan collection. The type of collection gadget you are creating then determines the type of gadget that is contained in the resulting collection gadget.

The most simple types of collection gadget mirror the standard buttons and menu buttons available, allowing you to create collections of push buttons, radio buttons, check buttons, and their menu button equivalents. Separators are automatically added to collections of menu buttons so as to delineate them visually from other menu buttons in the same menu.

Figure 8.6 A variety of simple collection gadgets


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index