When I turn off the progress indicator
however, or when I update the string value of the text field, the drawing
from the drawRect method above is drawn offset from its origin, instead
drawing at the origin of either of the subviews, resulting in spurious
lines being drawn where there
Hi,
I have a custom view that draws half a frame and a gradient:
- (void)drawRect:(NSRect)rect {
// This results in darker separator line at left side.
[[NSColor colorWithCalibratedWhite:0.18 alpha:1.0] set];
NSRectFill(NSMakeRect(NSMinX(rect), NSMinY(rect), 1,
On 15 Oct 2008, at 12:38 am, Antonio Nunes wrote:
As you can see from the image it looks like the view first draws
itself correctly, then gets drawn for each of the other subviews,
with its origin offset to match the origin of the subview in
question. I don't understand why this happens.
On 14 Oct 2008, at 14:43, Benjamin Stiglitz wrote:
The rect passed to -[NSView drawRect:] is the dirty rect of the view,
not the bounds of the view. The changing subviews are dirtying your
view
and then you're drawing as if that changed area was your complete
frame.
Try replacing your use