Treeview, Treeselection and row selection
- From: kbg <kbg-octoz tiscali fr>
- To: gtk-perl-list gnome org
- Subject: Treeview, Treeselection and row selection
- Date: Sat, 09 Oct 2004 14:49:56 +0200
Hello all
If got a problem with this programm
my @language = ('Francais','English');
my $store = Gtk2::ListStore->new ('Glib::String');
foreach my $d (@language)
{
my $iter = $store->append;
$store->set ($iter,0, $d);
}
my $list = Gtk2::TreeView->new_with_model($store);
my $selection = $list->get_selection;
$selection->set_mode ('single');
my $selected = $selection->get_selected;
my $renderer = Gtk2::CellRendererText->new;
my $column = Gtk2::TreeViewColumn->new_with_attributes
(Translate::TranslateWord('Language',$lang),$renderer,text => 0);
$column->set_sort_column_id (0);
$list->append_column ($column);
return ($list,$selected);
I want that "$selected" takes the value of the selected row ('Francais'
or 'English') so i try with "get_selected" from TreeSelection but it
doesn t work, "$selected" is empty
I ve read all the pod and documentation i ve find but nothing to
do....Can someone help me?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]