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

Re: Setting color to an NSView


  • Subject: Re: Setting color to an NSView
  • From: Michael Watson <email@hidden>
  • Date: Fri, 8 Dec 2006 09:53:35 -0500

Where is that -drawRect: being done? In the NSView or the NSSplitView?

If it's in the NSView, are you sure myRect is what you think it is?


-- m-s

On 08 Dec, 2006, at 09:16, vibhatha v wrote:

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:
40bungie.org


This email sent to email@hidden

_______________________________________________

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


References: 
 >Setting color to an NSView (From: "vibhatha v" <email@hidden>)

  • Prev by Date: Re: Serious bug subclassing NSTextStorage
  • Next by Date: Re: Core Data and unknown types
  • Previous by thread: Setting color to an NSView
  • Next by thread: Re: Setting color to an NSView
  • Index(es):
    • Date
    • Thread