Re: [gtkmm] how to find out whether any treeview row is selected



Am Son, 2002-12-08 um 01.41 schrieb triendl klaus:
> hi all,
> 
> i connected to the TreeSelection::signal_changed signal just to find
> out whether any number of rows or no row is currently selected to set
> a button sensitive or not. but i didn't find any method to use.
> 
> it's a multiple select treeview and i guess in this case the
> select_foreach callback is not called back if no row is selected.

Yep.  gtkmm-2.1 has count_selected_rows(), but for gtkmm-2.0 you'll have
to use selected_foreach() and set a flag in the callback (passing a
pointer to 'bool' via SigC::bind() is probably the way to go).

--Daniel





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