I already looked at that Gtk link (in fact I mentioned it in my question), but it doesn't really help me. I tried to adapt the example to work with a label, but $label->window returns undef so it dies.

my $l = new Gtk::Label( "Success" ); my $colormap = $l->window->get_colormap(); my $gdk_color = Gtk::Gdk::Color->parse_color( "green" ); $gdk_color = $colormap->color_alloc( $gdk_color ); $l->window->set_background( $gdk_color );

Looking at it a bit closer, it seems to expect that the widget is already added to a realized window. That's unfortunate, since I'd like for my module to return a Gtk::Table that can then be added to a window at will.

As for the theme remark: I would compare what I'm working on to a web browser in that regard. There's some general UI that should be affected by themes (cfr. the browser chrome), and then some content that should be shown a certain way no matter what the theme (cfr. a webpage in the browser)


In reply to Re^2: Perl::Gtk and Color tutorial by Crackers2
in thread Perl::Gtk and Color tutorial by Crackers2

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.