• 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: clickable NSImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clickable NSImageView


  • Subject: Re: clickable NSImageView
  • From: "Mattias Arrelid" <email@hidden>
  • Date: Tue, 17 Jun 2008 18:22:37 +0200

Hi Angelo,

2008/6/17 Angelo Chen <email@hidden>:
> Hi,
>
> I use the code at the end to let user click on an image and open a URL, this works, but not really satisfactory as when the mouse is moved over the image, the cursor was not changed to point-hand shape, any idea to improve this? Thanks,
>
> Angelo
>
>
> @interface BannerView : NSImageView
> {
> }
>
>
> - (void)mouseDown:(NSEvent *)theEvent
> {
>        if ([theEvent clickCount] ==1) {
>                NSURL *url = [NSURL URLWithString:@"http://www.cnn.com";];
>                [[NSWorkspace sharedWorkspace] openURL: url];
>        }
> }

You really shouldn't create new threads for a question you've already
asked about; it would have been enough to bump the original thread
("opening default email and browser from the code") again. The
original mail did include two questions, which number one had already
been answered.

Regards
Mattias
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >clickable NSImageView (From: Angelo Chen <email@hidden>)

  • Prev by Date: Re: Prevent Asynchronous operation of beginSheetModalForWindow
  • Next by Date: PDF manipulation and fine control over page layout in Cocoa
  • Previous by thread: Re: clickable NSImageView
  • Next by thread: question on layer setup in Covertflow sample code
  • Index(es):
    • Date
    • Thread