Runtime Library Themed

The Tile controls do not support the same attributes as their Tk counterparts. This is very troublesome when designing the properties of a template. The Runtime Library ignores interface errors while Tile is present. This is especially necessary for the 'highlight' properties, since 'highlight' is not available in Tile. The widely used substitution of Tk controls with those from Tile is possible with the Runtime Library. However, I do not recommend substitution for 'Toplevel', 'Label', 'Frame' and 'Entry'.

Only the Rtl_mlistbox and Rtl_gridwin templates are affected by Tile. See: the section called “Rtl_mlistbox” and the section called “Rtl_gridwin”.

Tile is bundled with Tk 8.5. And Tile with Templates applies for this particular version, only.

Any Runtime Library based template supports a »-creator« property. The creator property can be used with a ttk::frame as its argument. The instance of that template then is created from a ttk::frame.

Critical missing Properties in Tile bundled with Tk 8.5

  • background

  • foreground

  • highlightThickness

  • highlightBackground

  • highlightColor

  • borderWidth

  • relief

Although, the Runtime Library is able to detect, when a Tile window is used, and silently ignores errors steming from the attempt to configure such a window. The retrieval however is a different part and requires either a fix of Tile –that it allows queries on such properties– or a workaround inside each template to remove the base properties from the interface and query the theme instead for their values.

Without either one, a template based window can not report what properties it actually has. The »configure« all message must fail for the window.

»cget« and »configure« are not affected as long as the property does not originate from the Tile window.

The template interface must be changed in order to allow proper property retrieval from themed elements. This can be done by replacing the first item inside property map table with special code which queries the theme instead of the window for the property in question.

Any window belonging to the template interface will after Example 2.3, “Inoculate the Template Interface against Tile” partake in Tiles colour scheme –regardless of its origin from »tk::« or »ttk::«.

The Rtl_mlistbox header design will be disrupted when 'Label' is substituted with 'TLabel' –the header label uses a different background colour. The following code fragment presents how to preserve Tk’s label for Rtl_mlistbox.

Under Tcl/Tk 8.5 and higher, the tk label is imported into the Rtl_mlistbox namespace. The rescue operation Example 2.6, “Tcl/Tk 8.4 Combine Tile and Rtl_mlistbox” is thus only necessary for 8.4 and earlier Tcl/Tk releases.

The Rtl_gridwin template provides scrollbar management. The Rtl_tree and combobox template do have an embedded Rtl_gridwin.

The template contains code designated to work with Tile

Instructing Rtl_gridwin to use Tile