Re: wxTreeCtrl InsertItem Method

2014-11-07 Thread James Lynes
I think something like the wxPerl Cookbook would be useful if well indexed and documented. James On Fri, Nov 7, 2014 at 5:28 AM, Steve Cookson wrote: > Hi James, > > On 05/11/14 21:30, James Lynes wrote: > >> >> I couldn't find a method that returns an item's position under a node, so >> I wro

Re: wxTreeCtrl InsertItem Method

2014-11-07 Thread Steve Cookson
Hi James, On 05/11/14 21:30, James Lynes wrote: I couldn't find a method that returns an item's position under a node, so I wrote a sub to loop through all the children of a node and calculate the index(get_item_index). Surprised this function wasn't in wxWidgets. I'm sure we all write littl

Re: wxTreeCtrl InsertItem Method

2014-11-05 Thread James Lynes
Steve: InsertItemBef works. I couldn't find a method that returns an item's position under a node, so I wrote a sub to loop through all the children of a node and calculate the index(get_item_index). Surprised this function wasn't in wxWidgets. AppendItem is also useful as it has two behaviours.

Re: wxTreeCtrl InsertItem Method

2014-11-05 Thread Steve Cookson
Hi James, On 05/11/14 17:14, James Lynes wrote: I assume that you were looking in TreeCtrl.xs(I'm starting to see how/where things are done!) Yes. I see that InsertItemPrev needs two item pointers while InsertItemBef uses one pointer and one index. I'll give InsertItemBef a try, it's not i

Re: wxTreeCtrl InsertItem Method

2014-11-05 Thread James Lynes
Steve: Thanks. I assume that you were looking in TreeCtrl.xs(I'm starting to see how/where things are done!) I see that InsertItemPrev needs two item pointers while InsertItemBef uses one pointer and one index. I'll give InsertItemBef a try, it's not in the wxWidgets docs. I guess wxPerl needs

Re: wxTreeCtrl InsertItem Method

2014-11-05 Thread Steve Cookson
Oh James, stop press, On 05/11/14 14:48, Steve Cookson wrote: If you look at the two methods (InsertItem ), it looks to me as though the second would be the most intuitive. "Insert" normally means insert

Re: wxTreeCtrl InsertItem Method

2014-11-05 Thread Steve Cookson
Hi James, It looks a bit complicated. I'm not a user of TreeCtrl. On 05/11/14 14:03, James Lynes wrote: Good Day All: I'd like to use the wxTreeCtrl InsertItem method. 1. I tried calling it and got a loading error which unfortunately I didn't copy down the exact wording.

wxTreeCtrl InsertItem Method

2014-11-05 Thread James Lynes
Good Day All: I'd like to use the wxTreeCtrl InsertItem method. 1. I tried calling it and got a loading error which unfortunately I didn't copy down the exact wording. Is this method wrapped? 2.Also, to insert an Item, you need an empty Item to insert. I found wxTreeItemId in w