0

I want to click a text on the panel with a underline and the text color is blue, and then show a web , I know how to show a web , but how to define the text , in nib when I put a label on the window , I found the label didn't respond for the action , when I put a button with no border I found that I didn't edit the text attribute of the button , which module should I put on that and how to edit that text attribute?Thanks a lot. The impact I want to show is : http://stackoverflow.com

3
  • Could you post some code, to clarify what you're trying to do? Perhaps screenshots to demonstrate the difference between expected and actual behaviour? Jul 14, 2009 at 4:07
  • 1
    He wants to make a hyperlink. Jul 14, 2009 at 6:34
  • yes , I want to make a hyperlink ,but it is a button with the text ,so I can respond for the click action .
    – jin
    Jul 14, 2009 at 8:40

2 Answers 2

2

You could use an NSTextField with attributed text marked with NSLinkAttributeName.

Check out this Apple example http://developer.apple.com/qa/qa2006/qa1487.html

1

Why don't you add a WebView and then you can put html directly in there?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.