• 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: Once again: Clickable hyperlink in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Once again: Clickable hyperlink in NSTableView


  • Subject: Re: Once again: Clickable hyperlink in NSTableView
  • From: "Johannes Fahrenkrug" <email@hidden>
  • Date: Tue, 5 Feb 2008 08:55:23 +0100

Ok, so if I follow that path, I'll be able to have the cell show just
text in some rows (the ones with error messages) and display a
clickable NSButtonCell in the rows with an URL? I will have to code
the "open this url in the browser"-part myself in that case, right?
I was hoping that there would be a way to use NSAttributedString in
some way: I can *display* a hyperlink with NSAttributedString (via
initiWithHTML:@"...<a href=\"http://someurl\";>Click</a>...." in my
table, but I can't click on the hyperlink.

So the only way is to use NSButtonCell to actually make a button that
the user clicks on within the table column?

Just to take this one step further, out of curiosity: What if I'd want
to have Text with a hyperlink show up in a table cell, ie: "To visit
our website click here!" and only the "click here" part being
clickable. That would not be solved with the NSButtonCell approach,
right?

Would the only solution be a custom TableCell?

Sorry for all the questions, I just want to make sure I get in straight :)

- Johannes

On Feb 4, 2008 5:00 PM, I. Savant <email@hidden> wrote:
> > I don't have to select the rows, having the cell clickable would be
> > enough: But the cell is not a hyperlink in every row: in some rows,
> > the cell should display a clickable URL, in other cases it displays a
> > status or error msg text.
>
>   In that case, you could use
> -tableView:willDisplayCell:forTableColumn:row: to adjust the
> formatting (and "enabled" state) of the button cell representing your
> clickable URL *or* simply swap it out with another cell type
> altogether.
>
> --
> I.S.
>
_______________________________________________

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: 
 >Once again: Clickable hyperlink in NSTableView (From: "Johannes Fahrenkrug" <email@hidden>)
 >Re: Once again: Clickable hyperlink in NSTableView (From: Stephane Sudre <email@hidden>)
 >Re: Once again: Clickable hyperlink in NSTableView (From: "Johannes Fahrenkrug" <email@hidden>)
 >Re: Once again: Clickable hyperlink in NSTableView (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Use of Mac OS X 10.5 / Leopards Garbage Collection Considered Harmful
  • Next by Date: ScreenSaverView and Core Animation
  • Previous by thread: Re: Once again: Clickable hyperlink in NSTableView
  • Next by thread: Re: Once again: Clickable hyperlink in NSTableView
  • Index(es):
    • Date
    • Thread