FROM : Shaun Wexler
DATE : Mon Jan 27 03:36:24 2003
On Sunday, January 26, 2003, at 02:37 PM, Andrew Merenbach wrote:
> I would like to accept various drops on my table view, but would
> rather that the entire table view become outlined, rather than an
> indicator bar be drawn, to signal that a drop can occur, as the
> dropped data would not be inserted at the particular location
> indicated by the bar. What will I need to do to make this happen?
In your "validateDrop" NSTableView delegate method, retarget the drop
to row (-1), and insert it where you really want it within the
"acceptDrop" method. The NSTableView should draw a black rectangle
inside its bounds. Use my focus ring code as a hint on how to enhance
the appearance for drag/drop, which also works when the "real" target
is not actually the NSTableView, such as suggested by Scott Anguish.
It can also be used with the NSScrollView, drawing the focus ring
around its frame, rather than within the NSTableView 'sbounds.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Mon Jan 27 03:36:24 2003
On Sunday, January 26, 2003, at 02:37 PM, Andrew Merenbach wrote:
> I would like to accept various drops on my table view, but would
> rather that the entire table view become outlined, rather than an
> indicator bar be drawn, to signal that a drop can occur, as the
> dropped data would not be inserted at the particular location
> indicated by the bar. What will I need to do to make this happen?
In your "validateDrop" NSTableView delegate method, retarget the drop
to row (-1), and insert it where you really want it within the
"acceptDrop" method. The NSTableView should draw a black rectangle
inside its bounds. Use my focus ring code as a hint on how to enhance
the appearance for drag/drop, which also works when the "real" target
is not actually the NSTableView, such as suggested by Scott Anguish.
It can also be used with the NSScrollView, drawing the focus ring
around its frame, rather than within the NSTableView 'sbounds.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Andrew Merenbach | Jan 26, 23:37 | |
| Scott Anguish | Jan 27, 00:32 | |
| Shaun Wexler | Jan 27, 03:28 | |
| Shaun Wexler | Jan 27, 03:36 | |
| Stéphane Sudre | Jan 27, 13:10 |






Cocoa mail archive

