in reply to Gtk2::SimpleList Checkboxes

SimpleList is designed to give you a list very simply. My standard line is that for somethng like this, your usage is no longer Simple, and you'll want to use TreeView and ListStore directly. To hook into the change of the checkbutton, you need to connect to the "toggled" signal of the CellRendererToggle for the appropiate column. This is something you do as part of setting up editable cells. If you look at the source of SimpleList, you'll see in the setup that the CellRendererToggle's "toggle" signal is set up to modify the model when toggled. You'll need to fetch the cellrenderers for the column and connect your own signal handler. ... Or just create the view for yourself and you'll have the CellRenderer. This isn't really a perl issue at all, it's just a gtk+ thing.

Replies are listed 'Best First'.
Re^2: Gtk2::SimpleList Checkboxes
by gnubbs (Beadle) on Apr 18, 2005 at 14:56 UTC
    I am not sure that I buy your argument in this case. SimpleList takes care of a lot behind the scenes, so I am not sure I should throw it out just because I am doing something a little bit more complicated with it. I think the end result - using SimpleList to build the model and then delving into the TreeModel backend to do the hard stuff. As far as it not being a perl thing, well, I would argue that since I am using a Perl API that it is at least somewhat of a perl thing. At least enough of a perl thing to try out the sanity of perlmonks before the chaos of the mailing lists.