• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: custom drag image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom drag image


  • Subject: Re: custom drag image
  • From: email@hidden
  • Date: Thu, 28 Nov 2002 10:11:43 +0000

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@hidden>
Sent by: email@hidden
27/11/02 08:21 pm

To: email@hidden
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@hidden
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@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >custom drag image (From: Saratchandra Kongara <email@hidden>)

  • Prev by Date: Re: Foolish question about NSStrings
  • Next by Date: Text Color in NSButton?
  • Previous by thread: custom drag image
  • Next by thread: NSTextView text changes size
  • Index(es):
    • Date
    • Thread