Re: Drawing widgets in a custom cellrenderer




On Mar 19, 2008, at 2:49 AM, Shalom Bhooshi wrote:

Thank you for the quick reply and example. Although your example does actually eventually let me accomplish what I need (I'm not being ungrateful, I truly appreciate and learn from your numerous invaluable contributions :) ), it doesn't use a treeview/ treeviewcolumn combination, something I was looking to employ for the functions like sorting, reordering, searching, etc (searching especially).

Aha, undocumented requirements!  :-)

Well, i used a SimpleList, which ISA TreeView containing TreeViewColumns, but each section has its own TreeView and therefore there is no global header you can use to sort and such. You could fake it with a button row at the top and some sizegroup magic, but it would probably not be worth it.

Yes, you can draw pretty much anything you want with a cellrenderer's RENDER method. See the cellrenderer-popup example for inspiration; this uses Style methods to draw the cell to look just like a ComboBox in its OptionMenu replacement mode.

http://gtk2-perl.cvs.sourceforge.net/gtk2-perl/gtk2-perl-xs/Gtk2/examples/cellrenderer_popup.pl?revision=1.10&view=markup

But, be warned; this means you'll be diving into the messy world of trying to figure out how themes interact.



--
The one difference between Dali and a crazy man is very simple: Dali is not crazy at all.
  -- Salvador Dali





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