From: Jason P. <ma...@cc...> - 2005-09-27 04:01:54
|
I have managed to sort out the workings for MY needs, but, I need to generalize it for reusability. I haven't messed with the drag and drop of files ONTO the treeview, as of yet, but that would most likely require drag and drop support for the window itself, with a positive HitTest on the treeview. (unless this is another of those 5.6 to 5.8 bugs from activestate). Jason P Ariel Serbin wrote: >thanks so much for the advice. this one really did >seem like it would be a huge pain. i'd love to see >the example, if you can spare the time... > >-ariel > >--- "Jason P." <ma...@cc...> wrote: > >>Ariel Serbin wrote: >> >>>I have two questions. I'm writing an app that helps people to assign files to categories and lets them >>>order the files within those categories. I have set my app up to use a two-level treeview which shows the categories and the files within, like so: >>> >>>- Category 1 >>>file1 >>>file2 >>>- Category 2 >>>file3 >>>file8 >>>file50 >>> >>>Here are my questions: >>> >>>1. Can I enable the user to re-order the files >>>withing the categories by dragging them to a new >>>location? (i.e. drag file50 so that it is between >>>file3 and file8.) >>> >>>2. Can I enable the user to drag an external file to a specific place in the treeview? At the very least, I'd like to allow the user to drag files into a >>>specific category. >>> >>>If anyone has any thoughts on this, I would appreciate your input... >>> >>>-Ariel >>> >>> >>I have been messing with TreeViews Drag and drop >>abilites, and here are >>some things you might want to consider: >> >>onClick = NodeClick, minus the node which was >>clicked, >> >>onMouseUp is hardly ever fired on a fast click, as a >>heads up, so using >>it for detecting drags may not be the single best >>idea. >> >>The built in Drag/Drop doesnt seem to do any good. >> >>my simulation of a drag and drop I can post for you >>after I've done some >>tweaking, as I am flipping between >>DropHilight/Target (why is this >>misspelled anyways?) and InsertMark (why is there no >>Get? it would be SO >>useful) >> >>Give me a day to get you my sample, in the event no >>one else has one, as >>it looks like a busy night for me. >> >> >>Jason P >> |