cocoa - Bolding part of a string in an NSAlert -
i'm creating mac os x app , have issues formatting strings on nsalert
. want informative text formatted follows :
something something something
-------something bold in middle---------
other things other things other things
so far separate lines using \n
statement don't know how make line in middle bold , centred. have idea?
you should not this, , indeed cannot without subclassing nsalert
, or creating generic window yourself. alert can given plain string, not include decoration information (you need nsattributedstring
that); own bolding of text pass.
what can , should have @ "alerts" in hig, , see there 2 strings can supply alert: "message text", displayed in bold font, , "informative text". make use of achieve result consistent platform guidelines , needs.
Comments
Post a Comment