how does a control's focus ring get drawn?
how does a control's focus ring get drawn?
- Subject: how does a control's focus ring get drawn?
- From: Steve Christensen <email@hidden>
- Date: Wed, 4 Feb 2004 17:51:49 -0800
Here's why I'm asking: I subclassed NSTextField and NSTextFieldCell so
I could add a graphic inside the cell. Everything draws correctly
except for the focus ring.
If I override selectWithFrame:inView:editor:delegate:start:length: to
recalculate the frame for the adjusted text position and then call
[super selectWithFrame:...], when the control is highlighted, the text
and insertion point are drawn in the correct location, but the left
edge of the focus ring is drawn inside the control. If I don't override
selectWithFrame:..., the focus ring is drawn correctly but the text is
drawn on top of the graphic.
Is there something else I need to be looking at to get this all
working? I don't know what NSTextField would be looking at when
deciding where to draw the focus ring, other than it seems to use
what's passed into [super selectWithFrame:...].
*sigh* :-)
steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.