Re: unset default row in a treeview (treesort)

"Kevin Ryde" <user42 zip com au> wrote:
Oh, a set_cursor() under a "cursor-changed" might immediately recurse to
run "cursor-changed again.  Perhaps clear the $start_init before doing
the set_cursor().  Assuming a set_cursor() is in fact what you want!

Are you sure you don't want to make the initial selection and/or cursor
position when first setting in a model?  Or when the model is first

Aaah great! Yes you're right :D
sub on_theme_center_options_treeview_cursor_changed()
 if ($start_init == FALSE)
 $start_init = FALSE;
 # set 10th row in ThemeCenter list -> Theme manager
 &set_treeview_row($treeview_object, "Theme Manager");
 $selected_row = $theme_center_list_hash{"Theme Manager"};


sub set_treeview_row($$)
 my $treeiter = $tree_model->get_iter_from_string($row_path);
 &dprint(" treeiter: $treeiter\n");
 my $treepath = $tree_model->get_path ($treeiter);
 &dprint(" treepath: $treepath\n");
 $tree_view_object->set_cursor ($treepath, undef, FALSE);

it works like a charme!!!

Thank you very much!!
Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren:

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