TextField Background Color

In the Dev Ctr documentation, I read about background color but I seem not able to change a textfield background in code (Yes, I can change it via the property panel). I'm using my experience with Java and Visual Basic, Visual C...etc, where it is very simple to do in code.

This is the line in my code - there are no errors but, I do get a warning that no setBackgroundColor method exits. FYI - I have changed the camel case so, this line is only one of several I tried.

[TextField3 setBackgroundColor:(NSColor *)blueColor];

Also tried:
[TextField3 backgroundColor: (NSColor *)blueColor];

That didn't work either. The more I try Obj-C, the more I like Java!

How to change the color in code?
Thanks and great job on this site!

Submitted by Anonymous (not verified) on Mon, 12/07/2009 - 18:59.

Reply

The content of this field is kept private and will not be shown publicly.
Enter the code shown in the image:

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Donate!





If you like what you find here and wish to support further development of this site, please donate via PayPal. No account required.

Syndicate

Syndicate content

User login

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 13 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Enter the code shown in the image: