Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 2, 2009, 02:23 AM   #1
rethish
macrumors member
 
Join Date: Oct 2008
changing background color of a textview using colorwel?l

Hi,

I use a nscolorwell to change the back ground color of a nstextview.
I use an action method to do this task.

When I click the colorwell for the first time, the color panel window opens
and if I type in textview , the text color will be of the colorwell’s default color.

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)bgColwelactionid)sender
{

[textView setBackgroundColor:[bgColorwell color]];

}

Is anything missing?

Thank you in advance..

Rethish.
rethish is offline   0 Reply With Quote
Old Jun 2, 2009, 05:36 AM   #2
SRossi
macrumors regular
 
Join Date: May 2009
Location: Glasgow, Scotland
I had exactly the same problem as you just last week.

I figured out that you cannot have the background change colour when the notification from the colorWell changes because it will also change the text colour.

Where is your colourWells set up? In a panel or the same window as the textView?

Stephen
__________________
macMini, 2.0 GHz Core 2 Duo, 1 GB RAM, 120GB hd;
Dell S2209W 21.5" monitor;
iPhone 4GS 16GB;
30 GB iPod video;
SRossi is offline   0 Reply With Quote
Old Jun 3, 2009, 04:27 AM   #3
rethish
Thread Starter
macrumors member
 
Join Date: Oct 2008
Quote:
Originally Posted by SRossi View Post

Where is your colourWells set up? In a panel or the same window as the textView?

Stephen
hi,

I use the colorwell and the textview in the same window.

Thankyou
rethish is offline   0 Reply With Quote
Old Jun 3, 2009, 12:04 PM   #4
SRossi
macrumors regular
 
Join Date: May 2009
Location: Glasgow, Scotland
The way I ended up changing the background colour was placing the NSColorWell in a panel like "Preferences" and changing the colour from there.

Thats the only way that I got it to change the background without changing the text.

Although I'm sure there's someone with a easier solution.

Stephen
__________________
macMini, 2.0 GHz Core 2 Duo, 1 GB RAM, 120GB hd;
Dell S2209W 21.5" monitor;
iPhone 4GS 16GB;
30 GB iPod video;
SRossi is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Pages help - Keyboard shortcuts to change background color of font?? naked Mac Applications and Mac App Store 0 Sep 9, 2010 11:03 AM
Change background color of text Keynote 09 grimreaper1377 Mac Applications and Mac App Store 4 Jan 28, 2009 06:32 PM
Change Background color of button rup28aug iPhone/iPad Programming 1 Dec 18, 2008 09:57 AM
changing background color of a window in finder vnraju Mac Programming 6 Aug 21, 2007 07:53 AM
Changing overall background color of slides in keynote? anotherjeff Mac Applications and Mac App Store 0 Apr 5, 2006 04:59 AM


All times are GMT -5. The time now is 03:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC