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

clickable NSImageView


  • Subject: clickable NSImageView
  • From: Angelo Chen <email@hidden>
  • Date: Tue, 17 Jun 2008 08:17:51 -0700 (PDT)

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];
	}
}




      Yahoo! Mail具備一流的網上安全保護功能,請前往 http://hk.antispam.yahoo.com/ 了解更多相關資訊!
_______________________________________________

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

  • Follow-Ups:
    • Re: clickable NSImageView
      • From: "Mattias Arrelid" <email@hidden>
    • Re: clickable NSImageView
      • From: Tolga Katas <email@hidden>
    • Re: clickable NSImageView
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Newbie interface questions - multiple "modal" windows
  • Next by Date: Re: Programatically placing panels inside a window
  • Previous by thread: Re: iMovie HD like splash screen
  • Next by thread: Re: clickable NSImageView
  • Index(es):
    • Date
    • Thread