Re: More on formatting a TreeViewColumn's header ...

Grant McLean wrote:

On Thu, 2006-07-06 at 14:12 +1000, Daniel Kasak wrote: 
Hi all.

Thanks to muppet's hint, I've worked out how to replace whatever it is
that renders column headers with a Gtk2::Label. I can do pango markup on
it the label, which is great, but setting the alignment doesn't seem to
work. Should it? If not, are there any other approaches?

I can't comment on whether it should or not, but a little
experimentation showed that the label object's parent is actually a
Gtk2::Alignment widget (but apparently not until the window has been

I added these lines after the $window->show_all in your script:

  my $parent = $label->get_parent;
  print "label: $label  parent: $parent\n";
  $parent->set(0.5, 0.5, 1, 1);

and that resulted in a centered heading.

Excellent! Thanks a lot. That's working perfectly for me now.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]