New topic: Drag and Drop Hierarchical Listbox Source Code Question
<http://forums.realsoftware.com/viewtopic.php?t=29738> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message applesource Post subject: Drag and Drop Hierarchical Listbox Source Code QuestionPosted: Tue Aug 25, 2009 7:19 pm Joined: Thu Aug 06, 2009 2:25 pm Posts: 95 Location: Oregon I've been working for about a week now on perfecting this, and it seems to be almost there. The amount of code seems a bit crazy, and I'm thinking I probably went the long-way-round in achieving the results: Being able to drag and drop reorder in a listbox that is hierarchical with containers (folders). The problem is that it still doesn't quite work *all* the time. For example, moving an item to the top of the list and then to the bottom only works half the time, etc. I was wondering if anyone has implemented such a design in a hierarchical listbox before. I've put my source code online here: Quote:http://www.applesource.biz/dragondroplistbox.zip If anyone wants to take a look at the code and improve upon it, that'd be great. Or, if anyone has their own method of doing such a thing, I'd be interested to see your methods. Thanks! _________________ AppleSource Software http://www.applesource.biz Top cebe Post subject: Re: Drag and Drop Hierarchical Listbox Source Code QuestionPosted: Wed Aug 26, 2009 2:47 am Joined: Fri May 16, 2008 8:00 am Posts: 14 Location: Germany Snippet from "DragReorderRows":Code:else // it's a client we're looking for for i=0 to uBound(theData.nodes) for x=0 to uBound(theData.nodes(i).children) if boxGroups.cell(newPosition-1,2)=nthField(theData.nodes(i).children(x),"\/",2) then loc=i+1 exit end if next next I don't know what you are doing here, but the problem is: "loc" does not increase and remains on zero. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
