Re: ListItem selections



On Tue, 2003-12-30 at 07:13, Mika Ristolainen wrote:
I'm having  Gtk2::List  with ListItems in it, but
i'm unable to do selections of anykind. Probably
missing something simple but after browsing perl-gtk2
list and listitem api, couldn't find any suitable
method for getting data or even index of the
selection.

GtkList is deprecated and only included b/c GtkCombo used it (in the 2.4
series of gtk+ that will be replaced as well) and there was no
alternative.
http://developer.gnome.org/doc/API/2.0/gtk/GtkList.html#GtkList-struct

you probably want to take a look at Gtk2::SimpleList. and/or the
Model/View/Controller stuff. Gtk2::SimpleList is a perl module to aid in
the easy creation and manipulation of list data. it for all intents and
purposes is a Gtk2::TreeView with a special hash key tied to the data of
the list. for info on Gtk2::SimpleList see
simplelist.pl in the examples directory of Gtk2-Perl (s.f.'s browse cvs
seems to be down at the moment or i would provide you a url. if you want
to do it the straight gtk+ way, see:
http://developer.gnome.org/doc/API/2.0/gtk/TreeWidgetObjects.html

any further questions welcome, hopefully that will help.
-rm





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