• 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
Text fields and image views have border when viewed against white view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text fields and image views have border when viewed against white view


  • Subject: Text fields and image views have border when viewed against white view
  • From: Henrik Nyh <email@hidden>
  • Date: Sun, 28 Jan 2007 21:25:38 +0100

I have a drawer that displays a custom view - it's a subclass of NSView that pretty much just does this to get a white background and a gray frame around it:

- (void)drawRect:(NSRect)rect {
	[[NSColor whiteColor] set];
	NSRectFill(rect);
	[[NSColor windowFrameColor] set];
	NSFrameRectWithWidth(rect, 1);
}

The view contains a couple of NSTextFields and NSImageViews. The problem is this: the text fields and image views have gray borders on some but not all edges.

Setting the NSTextField background to white and checking "draw" (both these things in Interface Builder) gets rid of the problem for text, but there are no such options for images. Do I have to subclass the NSImageView and make its background white? Shouldn't they work against any background color?
_______________________________________________


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


  • Prev by Date: Re: Conditional NSValueTransformer
  • Next by Date: NSButton Text Color?
  • Previous by thread: Re: MenuStatusItem --
  • Next by thread: NSButton Text Color?
  • Index(es):
    • Date
    • Thread