• 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: How can I set button text color, please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I set button text color, please


  • Subject: Re: How can I set button text color, please
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 08 Apr 2016 19:50:03 +1000

Thank you Shane, that was the key.

However, the new text is not centred. I would imagine there’s a Button Dictionary Key to set the text alignment, but I can’t find anything by Googling. How can I find out what the Buttons dictionaryWithObjects possible Keys are, please?

I haven’t installed "ASObjC Runner”, but will using it somehow allow me to get the keys of an object?

Regards

Santa

set temp to sender's title() as text
if temp is "Display only Errors Emails List" as text then
set my errorsListVisible to true
set p to 1
set myFont to current application's NSFont's systemFontOfSize:13.0
set p to 2
set AppleColors to current application's NSColorList's colorListNamed:"Apple"
set p to 3
set someColor to AppleColors's colorWithKey:"Red"
set p to 4
set attrsDict to current application's NSDictionary's dictionaryWithObjects:{myFont, someColor} forKeys:{current application's NSFontAttributeName, current application's NSForegroundColorAttributeName}
set p to 6
tell current application's NSAttributedString to set replacementText to alloc()'s initWithString:"Hide Errors Emails List" attributes:attrsDict
set p to 7
try
displayErrorsEmailsButton's setTitle:replacementText
end try


On 8 Apr 2016, at 2:03 PM, Shane Stanley <email@hidden> wrote:

On 8 Apr 2016, at 1:50 PM, Brian Christmas <email@hidden> wrote:

set myFont to current application's NSFont's fontWithName:"System Regular" |size|:13 # Regular 

System Regular is not a font name. Try systemFontOfSize:13.0

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
And what, you ask, was the beginning of it all?
And it is this......
Existence that multiplied itself
For sheer delight of being
And plunged with numberless trillions of forms
So that it might
find
itself
innumerably

Sri Aurobindo



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How can I set button text color, please
      • From: Shane Stanley <email@hidden>
References: 
 >How can I set button text color, please (From: Brian Christmas <email@hidden>)
 >Re: How can I set button text color, please (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: How can I set button text color, please
  • Next by Date: Re: How can I set button text color, please
  • Previous by thread: Re: How can I set button text color, please
  • Next by thread: Re: How can I set button text color, please
  • Index(es):
    • Date
    • Thread