Re: GtkTreeView with radio buttons



On 08/10/07 Kristian Rietveld said:

> I don't think a better way is possible really.  Cell renderers basically
> just render the content in your model on the screen in some way and when
> they are clicked they emit a signal.  These renderers usually never
> directly modify the model or have any logic that they need additional
> model data for.  It also does not keep track of the currently "active"
> toggle item, for this a cell renderer would have to monitor the model
> which is something cell renderers are not supposed to be doing.
> 
> 
> So yes, you will have to implement the logic for toggling yourself.

Ok, thanks for confirming that. It wasn't difficult to do, thanks to this
tutorial. 

http://scentric.net/tutorial/

That should be rolled into the main Gtk tutorial, IMHO. Currently GtkTreeView
is just in "undocumented widgets". 

Mike
-- 
Michael P. Soulier <msoulier digitaltorque ca>
"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction." --Albert Einstein

Attachment: pgpqWmJliDcwU.pgp
Description: PGP signature



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