Skip navigation.
 
mlRe: custom drag image
FROM : Warren.Burton
DATE : Thu Nov 28 11:11:43 2002

Take a look at the docs for
NSView's  - (void)writePDFInsideRect:(NSRect)aRect toPasteboard:
(NSPasteboard *)pboard
and then
NSImage's - (id)initWithPasteboard:(NSPasteboard *)pasteboard

you can get the TV to tell you where the selected cells are with
NSTableView's - (NSRect)frameOfCellAtColumn:(int)columnIndex row:(int)
rowIndex
and - (int)selectedRow and - (int)selectedColumn

Hope this helps

Warren Burton






Saratchandra Kongara <<email_removed>>
Sent by: <email_removed>
27/11/02 08:21 pm

        To:    <email_removed>
        cc:
        Subject:        custom drag image


Hello,
I like to implement a custom drag image with a snapshot of the selected
rows in a table view. I am not using the built-in mechanism because,  I
am using a custom NSTableView subclass for implementing alternating row
colors and the default drag image renders the selected text in white
color (barely visible) sometimes(randomly changes between black and
white).

I think I have to create a custom NSImage object to return from this
method.

- (NSImage*)dragImageForRows:(NSArray*)dragRows
event:(NSEvent*)dragEvent
dragImageOffset:(NSPointPointer)dragImageOffset;

I am not sure how to compose an image from row(s) of text. Any help is
appreciated. Thanks

Regards
Sarat
_______________________________________________
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.


**********************************************************************************
This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies.
We may monitor email to and from our network.
_______________________________________________
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 mailsAuthorDate
mlcustom drag image Saratchandra Konga… Nov 27, 21:21
mlRe: custom drag image Warren.Burton Nov 28, 11:11