Recent Changes - Search:

Widgets

(:toc:)

Widgets in Wize

Wize comes with a fairly complete set of builtin widgets.

The widgets are derived from Blt (greatly extended) Tk, Vu, Tktable, and TreeCtrl.

Tile Widgets

The Blt Tile widgets provide alternate implementations of the Tk Button, Checkbutton, Radiobutton, Menubutton, Label and Frame. These provide additional options for a more advanced appearance.

Tiled Backgrounds

All standard Tk and Vu widgets now support tiled backgrounds via the -tile option. This hooks into the Blt implementation of tiling. The Tktable and TreeCtrl widgets have their own builtin support for tiling, but with a different option name.

The following demonstrates how easy it is to add background image tiling globally to an application:

  . conf -tile [image create photo]
  option add *tile [. cget -tile]

Subsequently, a tile can be enabled like so:

 [.t cget -tile] conf -file /zvfs/img/tile/chalk.gif

and removed it with:

   [.t cget -tile] blank

Note: setting tiles this way will affect all windows, even builtin Tk dialogs.

Scrollable Tiles

Several widgets add support for the -scrolltile option which allows the tile to scroll with the widget. These include Text, Canvas, Entry, Listbox, and TreeView. The origin for scrolled tiles is always the current widget.

Tile Origins

Normally, tiled images use the origin of the toplevel. This allows a subwidget tile to mesh perfectly with its parent and is necessary because Tk does not have transparent widgets.

One exception is when using the -scrolltile option (see above). The other occurs within a Frame using -tiletop: this makes the frame the origin for all sub-tiles. This feature is primarily useful when a subtile is a picture rather than just an arbitrary repeating pattern.

For example, the following effect is derived using -tiletop on an inner frame:

Tiled Items

Text widget tags and Canvas polygon items now support the -tile option. This provides an easy way to support complex visual effects.

Here is a screenshot:

Option Type Introspection

Internally Tk widget options have a base type such as Integer and Bool. Wize configure supports dumping this type as an 6th option value if the widget path name begins with .__##. This is useful for command completion and typechecking.

Edit - History - Print - Recent Changes - Search
Page last modified on September 14, 2011, at 09:29 AM