|Nebula Grid -- GridViewer, DragSourceEffect, and More [message #499238]
||Fri, 20 November 2009 14:28
| Ian Harac
Registered: November 2009
Location: Southern Indiana
OK, trying to put all this into context...|
I have a Grid, and a Grid viewer. In my DragSourceAdapter, I was setting my Image in BeginDrag. This workd fine, until the grid was scrolled horizontally. It didn't matter how many columns were visible -- that is, if I had three visible columns , the error would occur if I scrolled to the fourth and began to drag, if I stretched the window so column 4 was visible w/out scrolling, it would drag fine, but the error would occur if I scrolled to 6, etc. Basically, the default GridDragSourceEffect would be invoked *before* my DragSourceAdapter class, and it would crash horribly trying to perform whatever the default drag image was. (Perhaps due to me having 3049 columns in the grid).
However, I could find no way to set a new DragSourceEffect using just the GridViewer. Using the Grid, I could add a DragSource object, then set that objects DragSourceEffect to my own class, but I can't find a way to access this functionality using GridViewer.AddDragSupport(). I tried declaring that my DragSourceAdapter extended DragSourceEffect, then passing that to AddDragSupport, but it had the same problem -- it still kept invoking GridDragSourceEffect once the grid had scrolled horizontally. Ultimately, I gave up and just used the Grid/DragSource solution, but that bugs me, since I'm using a Viewer and it seems I should do all data manipulation through that.
BTW, is there a downloadable JavaDoc for the Nebula Widgets anywhere?
Powered by FUDForum
. Page generated in 0.02261 seconds