Descamps, Frederic wrote:
>Thanks, but I'd when I double click on an Item of the tree, it displays me
>the text of that Item.
ok, so it's different :-)
the event in this case is DblClick(), but it gets nothing on
input, so you can use SelectedItem() (eg. when you double click
on an item, the first click selects it, the second one triggers
the DblClick event):
sub Tree_DblClick {
my $node = $Window->Tree->SelectedItem;
my %nodeinfo = $Window->Tree->ItemInfo($node);
print "Double clicked on $nodeinfo{-text}\n";
}
BTW, you can take a look at pmx.pl in the samples directory, it
implements a quite complete interaction with a TreeView (eg.
clicks, double and right clicks, and keyboard).
__END__
# Aldo Calpini
print sort {$_{$a} cmp $_{$b}} values %{{split undef,
"xritajbugne fahokem csuctawer jhdtlrnpqloevkshpr"}};