From: Alex T. <al...@tw...> - 2006-04-26 21:01:25
|
Aaron Howard wrote: >I haven't really gone very far into the drag and drop functionality yet; >I am putting this out to the mailing list for feedback, etc. I'm >basically trying to merge items via drag and drop. > > If you need drag-and-drop (purely) within the tree, there is pretty good support built into the treeCtrl. Basic examples (mentioned in case you didn't see them already) are in : PythonCard / samples / minimalTree wx Demo under Core Windows and controls / TreeCtrl and then for drag/drop example, look at http://wiki.wxpython.org/index.cgi/DragAndDropWithFolderMovingAndRearranging >Also, as a dragged item moves across other items, I want to update the >selected item to reflect which item the user would be dropping the >dragged one onto as well as update the mouse cursor to indicate items >that cannot be dropped onto. (For instance, items could only be merged >with items of the same depth on the tree or possibly promoted to a >higher level, but not demoted, so to speak.) Is there a "circle with a >line through it" mouse pointer? > > > This (basic version) is done by treeCtrl's built-in support - but I think if you need the dynamic feedback to be different for each item you could drop onto then you'll need to take over the drag move response yourself. See under wxCursor (wx.CURSOR_NO_ENTRY maybe ?) >Lastly, should I be able to do this in a way that will work seamlessly >on both Linux and Windows systems? > >I'm just getting started adding the drag and drop to this application so >I'll be testing ideas over the next few days. Any feedback is greatly >appreciated. > > -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.4.6/323 - Release Date: 24/04/2006 |