Re: Changing background color of a textview using colorwell?
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