Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
Padre::Wx::TreeCtrl(3)User Contributed Perl DocumentatioPadre::Wx::TreeCtrl(3)

       Padre::Wx::TreeCtrl - A Wx::TreeCtrl with various extra convenience

       Padre::Wx::TreeCtrl is a	direct subclass	of Wx::TreeCtrl	with a handful
       of additional methods that make life easier when	writing	GUI components
       for Padre that use trees.

	 SCOPE:	{
	     my	$lock =	$tree->lock_scroll;

	     # Apply changes to	the tree

       When making changes to Wx::TreeCtrl objects, many changes to the	tree
       structure also include an implicit movement of the scroll position to
       focus on	the node that was changed.

       When generating changes to trees	that are not the immediate focus of
       the user	this can be extremely flickery and disconcerting, especially
       when generating entire large trees.

       The "lock_scroll" method	creates	a guard	object which combines an
       update lock with	a record of the	scroll position	of the tree.

       When the	object is destroyed, the scroll	position of the	tree is
       returned	to the original	position immediately before the	update lock is

       The effect is that the tree has changed silently, with the scroll
       position	remaining unchanged.

	 my $item = $tree->GetChildByText("Foo");

       The "GetChildByText" method is a	convenience method for searching
       through a tree to find a	specific item based on the item	text of	the

       It returns the item ID of the first node	containing the search text or
       "undef" if no element in	the tree contains the search text.

	 my @data = $tree->GetChildrenPlData;

       The "GetChildrenPlData" method fetches a	list of	Perl data elements
       (via "GetPlData") for all nodes in the tree.

       The list	is returned based on a depth-first top-down node order.

	 my @data = $tree->GetExpandedPlData;

       The "GetExpandedPlData" method is a variation of	the
       "GetChildrenPlData" method. It returns a	list of	Perl data elements in
       depth-first top-down node order,	but only for nodes which are expanded
       (via "IsExpanded").

       Copyright 2008-2013 The Padre development team as listed	in

       This program is free software; you can redistribute it and/or modify it
       under the same terms as Perl 5 itself.

       The full	text of	the license can	be found in the	LICENSE	file included
       with this module.

perl v5.24.1			  2013-11-09		Padre::Wx::TreeCtrl(3)


Want to link to this manual page? Use this URL:

home | help