• 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: NSButton Colour?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButton Colour?


  • Subject: Re: NSButton Colour?
  • From: Andrew Merenbach <email@hidden>
  • Date: Wed, 18 Sep 2002 17:28:36 -0700

I asked about this awhile back, and received instructions on changing the background of a square button, which worked for my purposes. What sort of button are you trying to change?

On Tuesday, September 17, 2002, at 06:23 AM, email@hidden wrote:

Message: 4
Date: Tue, 17 Sep 2002 14:11:52 +0200
Subject: Re: NSButton Colour?
Cc: email@hidden
To: Colin Doncaster <email@hidden>
From: Ondra Cada <email@hidden>

On Tuesday, September 17, 2002, at 08:23 , Colin Doncaster wrote:

Sorry for such a simple question, but how do I change the colour of a
button?

Generally, you don't. The main reason is that Apple does not want us to do
that. The technical one is that, so far as I know (did not check myself!)
actually a bitmap image is used for the background, and thus the change is
non-trivial.

It seems like such a simple thing but it doesn't want to change. It
seems like a lot of things have the setBackgroundColor member function
but NSButton doesn't.

Check the archives -- some time ago (a few months, IIRC) this was
discussed and even some sample code I kind of recall was posted. The trick
is to get the image, and change its pixels' colours. Non trivial of course
-- the more reason not to do that (unless really inevitable).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: UI: "Direct manipulation" is in conflict with "Forgiveness"
  • Next by Date: Disclosure item...
  • Previous by thread: Re: NSButton Colour?
  • Next by thread: how do I display a document at app start up?
  • Index(es):
    • Date
    • Thread