• 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
how does a control's focus ring get drawn?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Quartz/Cocoa Drawing question
  • Next by Date: Re: PreferencePane and NSDistributedNotification
  • Previous by thread: Re: Quartz/Cocoa Drawing question
  • Next by thread: Re: Making textured windows pretty
  • Index(es):
    • Date
    • Thread