Hiho,
I have problems setting cells to a bold font. I think this should work:
$model = Gtk2::ListStore->new ( "Glib::Boolean", "Glib::String" );
$tree = Gtk2::TreeView->new_with_model ( $model );
$ctoggle = Gtk2::CellRendererToggle->new;
$column = Gtk2::TreeViewColumn->new_with_attributes(
"Foo", $ctoggle, active => 0
);
$tree->add_column ( $column );
$ctext = Gtk2::CellRendererText->new;
$ctext->set ( weight => 'bold' );
$column = Gtk2::TreeViewColumn->new_with_attributes(
"Bar", $ctext, text => 1, weight_set => 0,
);
$tree->add_column ( $column );
So when column 0 is active, column 1 should be bold (very similar to the
example in gtk-demo/main.pl, except for the usage of style => 'italic',
style_set => 0, which is weight => 'bold', weight_set => 0 here).
But it doesn't work, nothing gets bold. I tested the whole thing with
'style', and it worked as expected.
Also it's even possible to write:
$ctext->set ( weight => 'FooBar' );
without getting any complaints. That makes be think, that the 'weight'
property is silently ignored completely here. If not, I'd be glad to
hear, what I'm missing ;)
Thanks,
Joern
--
LINUX - Linux Is Not gnU linuX
Attachment:
pgp0GMFaUHxwb.pgp
Description: PGP signature