I reread my post and realized that I didn't really give much in the way of specifics for Perl/Tk "theme" support. As the others mentioned, themes are somewhat supported by using Widget options and the option database. This basically allows someone to specify a different set of default configuration options for widgets in an application. The key benefit here is that it's a fairly simple mechanism that can be easily reused.

The amount of change is limited to what options a widget supports, the platform, and in the case of custom widgets, how the other coded and documented support for options. Generally these options don't allow fancy changes such as changes to the basic shape, or UI layout. For these sorts of changes (ie. circular Buttons) custom code and Images are used. As for platform-specific changes: For X, Tk support the various Tile options (-activetile, -disabledtile, -tile, -troughtile), but these do not work on Windows systems that I've used. Even some relatively basic options for some components are not portable such as the colors for Scrollbar widgets (works for X, but not Windows).

Often, Tk apps that feature "themes" implement it in a way that is application specific which may or may not use the option database and/or custom widgets. All that I've seen require custom code. Also, to be clear - there's a difference between trying to create a specific look-and-feel, and creating support for themes. As an example, Steve Lidie created a Tk app that emulates the iTunes interface (and the aqua look-and-feel) in Chapter 15 of Mastering Perl/Tk. This is the case of an app that attempts to emulate a specific style or theme. For an example of an application that features user-modifiable theme support, take a look at Martin's File Manager (Mafima)

If theme support is essential, your theming requirements are complex, and you don't want to spend time assembling the support yourself, I would suggest either Perl/GTk or Perl/Qt.

Hope that helps...

Rob

In reply to Re: Perl Tk themes by rcseege
in thread Perl Tk themes by critter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.