"muppet" wrote:
$tree->add_column ( $column );i presume pseudocode... append_column is what you want. (took me a minute to find it, myself.)
Yep, sure - typed this into my mailer without running Perl to verify it ;)
$ctext = Gtk2::CellRendererText->new; $ctext->set ( weight => 'bold' );you'd like to think that, wouldn't you? but no! you are thwarted by the gtk type system! according to the docs for GtkCellRendererText, the weight property is "weight" (gint: Read/Write) gint! not PangoWeight! this means that you can't use the built-in enum conversion stuff, which means that 'bold', the obvious string, is completely useless!
Ok, I got tricked by the 'style' property, but I understand the difference.
i, for one, don't really like that solution, because now you carry that to every file. the next option is to define these as constants in the Pango module, but you'd have to refer to them with a package name (or export them, which i would rather not do), a la Gtk2::Pango->SCALE.
Either this, or constants exported by Gtk2::Pango, controlled via EXPORT_OK (as suggested by Ross already). Defining such constants on the application level is wrong, at any rate. Regards, Joern -- LINUX - Linux Is Not gnU linuX
Attachment:
pgpFZbmoNQvS0.pgp
Description: PGP signature