Re: GtkTreeView with radio buttons

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

 



Hello,

On Sat, Oct 06, 2007 at 10:12:00PM -0400, Michael P. Soulier wrote:
> I have a gboolean column and I want to use that to render radio buttons.  I
> have the GtkCellRendererToggle set to show a radio button, but there seems to
> be no way to add these radio buttons to a group. At the moment I'll have to
> make them exclusive through the toggle callback. 
> 
> Is there a better way? 

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.


regards,

-kris.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux