Le 12 nov. 08 à 11:28, Ulf Dunkel a écrit :
I want to use some kind of URL text in a dialog, which the users
can click on and which should then open the browser with a specific
URL.
Ron Fleckner pointed me to this helpful link:
http://developer.apple.com/qa/qa2006/qa1487.html
I have implemented this now, but I am stuck in another tiny issue
right now. In my NIB file, I use an NSTextField with right alignment.
When I use the described -setHyperlinkWithTextField:, the alignment
is reset to left alignment. How do I keep right alignment in the
NSTextField once it has been filled with the
NSMutableAttributesString?
Any hints are welcome. :-)
--Ulf
You can either retreive the text field attributed string (using -
[NSControl attributedStringValue]), do a mutable copy, edit this copy,
and set it back using setAttributedStringValue:, or use the paragraph
style attribute to set alignment on your new attributed string (see
NSParagraphStyle class reference and NSParagraphStyleAttributeName).
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]