• 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
Image of a view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Image of a view


  • Subject: Image of a view
  • From: email@hidden
  • Date: Tue, 18 Jun 2002 16:18:48 +0100 (BST)

I'm having trouble creating an image of a view for dragging. First I create an image of the view using this code:

NSBitmapImageRep *myBitmap = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:[myView bounds]];

This code, I believe is correct but it doesn't seem to work. I have two outlets:
-myView
-myImage

then the usual:

[myImage setImage:myBitmap];

I'm I doing this right? Is there a better way to do this? Is there an example of dragging views (i've looked at the image dragging example by Apple which is really helpful for dragging images but I need to drag a view ie. Image & Text at the same time.)

Ideally I need something like the system preferences where you can drag a prefPane to the toolbar.

Thanks in advance for any help.

Luke.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Image of a view
      • From: Charles Jolley <email@hidden>
    • Re: Image of a view
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Protecting Software w/ Software License Keys...
  • Next by Date: Re: protecting software & uniquely identifying the machine
  • Previous by thread: Re: Signal 11 (SIGSEGV)
  • Next by thread: Re: Image of a view
  • Index(es):
    • Date
    • Thread