in reply to Gtk2::TreeView get all childs of a parent,an easy way ?

get_children or getChildren is standard fare for trees, gtk2, go figure

http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/TreeView.html#treemodel_or_undef_t

http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/TreeModel.html#treeiter_tree_model_

So I imagine

if( my $kids = eval { $tree->get_model->iter_children( $parent ) } ){ for my $kid ( @$kids ){ dance($kid); } }

Replies are listed 'Best First'.
Re^2: Gtk2::TreeView get all childs of a parent,an easy way ?
by ultibuzz (Monk) on Jun 17, 2013 at 06:18 UTC

    OMG...,thanks a lot
    i totally forgot about the TreeModel while coding ...,
    and i was wondering why the heck the TreeView has no Ordinary data functions for it's display hierarchy

    now i'll use the day to simplify the code with TreeModel functions, and get rid of all my crazy buildarounds :D

    kind regards
    Alex