Just a simple [cpan.org] guy, hacking Perl for fun and profit since way back in the last millenium. You may find me hanging around in the monestary [perlmonks.org].
What am I working on right now? Probably the Sprog project [sourceforge.net].
GnuPG key Fingerprint:
6CA8 2022 5006 70E9 2D66
AE3F 1AF1 A20A 4CC0 0851
I'm currently playing around with a pet project that uses Gtk2. After I add a bit of handler code or a new widget, I run the program and find myself resizing the windows back and forth, clicking and dragging and generally messing about far longer than is necessary. Well I did say I was playing
My current challenge involves a Gtk2::TreeView. I think I've got my head around the MVC theory and the GTK mechanics and I even have it working for the simple case where every row contains text. However I really want some of the rows to contain a separator bar that at looks like a Gtk2::HSeparator. Anyone know how to achieve that?
Sadly Pango markup does not support the <hr> tag or it would be pretty simple. I'm wondering if I'll have to write my own cell-renderer and if that's even possible from Perl. Anyway I'm having fun.
Custom cell render (Score:1)
for the record, I was able to implement custom cell rendering. One column value in my model was used to flag whether the cell was rendered as text or as a separator; another column contained the text (if any).
I got the basic elements of the solution from this script [sourceforge.net] in the gtk-perl examples directory. In my RENDER method I used
$widget->get_style->paint_shadowto draw the separator box although I might trypaint_boxwith a "bar" style.