reorder items in TreeCtrl
wx at 61131.com
wx at 61131.com
Fri Jun 1 08:37:04 PDT 2007
Friday, June 01, 2007 3:51 PM "Vadim Zeitlin" <vadim at wxwindows.org> wrote:
VZ> On Sat, 26 May 2007 17:24:05 +0200 (MEST) Tomasz Toczyski
<tt at praterm.com.pl> wrote:
VZ>
VZ> TT> How to reorder sibling items in TreeCtrl without pain?
VZ>
VZ> If by "pain" you mean "having to write the code yourself" I'm afraid you
VZ> can't avoid it. OTOH I don't think it's that painful, you just have to
VZ> write a relatively simple recursive function.
In the past I have done this quite often and soon will have to program it
again. Reordering a TreeCtrl isn't rare and could become a contribution to
wxTreeCtrl.
Any idea about the member functions? Maybe like
bool MoveSubTree(const wxTreeItemId& after, const wxTreeItemId& source);
bool MoveSubTree(const wxTreeItemId& before, const wxTreeItemId& source);
bool MoveSubTree(const wxTreeItemId& into, size_t before, const
wxTreeItemId& source);
regards
Friedrich
More information about the wx-users
mailing list