• 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: Changing background color of a textview using colorwell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing background color of a textview using colorwell?


  • Subject: Re: Changing background color of a textview using colorwell?
  • From: Graham Cox <email@hidden>
  • Date: Tue, 2 Jun 2009 17:27:50 +1000


On 02/06/2009, at 5:17 PM, rethish wrote:

Is this colorwell default behaviour?

And if I select any color from the color panel the background color changes
and if type
In textview, the text will also appear in the same color., which makes the
text invisible.



I only want to change the back ground color of the textview.

Here is what I did:

-(IBAction)bgColwelaction:(id)sender
{

   [textView setBackgroundColor:[bgColorwell color]];

}

Is anything missing?


The problem is that the color PANEL sends its action to first responder's changeColor: method, which NStextView implements to change the text colour. This is still sent even when a color WELL is active.

So you need to temporarily change the action of the panel to nil while your colour well is active. You'll need to subclass the colour well to get a chance to do that.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Changing background color of a textview using colorwell? (From: rethish <email@hidden>)

  • Prev by Date: Changing background color of a textview using colorwell?
  • Next by Date: Re: Can't set header on NSURLRequest
  • Previous by thread: Changing background color of a textview using colorwell?
  • Next by thread: Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
  • Index(es):
    • Date
    • Thread