• 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
Setting color to an NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting color to an NSView


  • Subject: Setting color to an NSView
  • From: "vibhatha v" <email@hidden>
  • Date: Fri, 8 Dec 2006 19:46:14 +0530

Hi,

I have an NSView and this NSView is a part of splitview.
Now, i have to set color to this NSView. Also, i have some text fields on my
view which should be visible.
i tried setting the color using,

-(void)drawRect:(NSRect)rect
{
   NSRect myRect = NSMakeRect(0,398,212,107);
   [[NSColor blueColor] set];
   NSRectFill(myRect);
}

in my custom class.

Also, i tried setting the view color in my controller class also.
But this does not seem to work.

Can anyone suggest me as to where i have gone wrong?

Thanks and Regards,
Vibhatha.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: Setting color to an NSView
      • From: "I. Savant" <email@hidden>
    • Re: Setting color to an NSView
      • From: "Alan Smith" <email@hidden>
    • Re: Setting color to an NSView
      • From: Michael Watson <email@hidden>
  • Prev by Date: Re: animating windows fade in/out
  • Next by Date: Re: Deciding whether text should be black or white for a given background color
  • Previous by thread: Re: Linkage and runtime errors when using Objective C++
  • Next by thread: Re: Setting color to an NSView
  • Index(es):
    • Date
    • Thread