Removing focus rings from NSImageViews
Removing focus rings from NSImageViews
- Subject: Removing focus rings from NSImageViews
- From: Ken Tabb <email@hidden>
- Date: Thu, 24 Nov 2005 16:41:15 +0000
Hi folks,
I have an NSImageView subclass that I'm trying to display without a
focus ring - the view needs to show that it is selected using other
visual means besides a focus ring (it is a web plugin). However
despite all 'reasonable' attempts, I can't quite kill the focus ring
entirely. Here is what I've tried so far:
[1] Calling [myImageView setEnabled:NO] does indeed kill the focus
ring, but it also prevents it from receiving drag / drop operations,
cut/copy/paste etc., so bearing in mind it knobbles all of the
required functionality besides the focus ring, is a non-starter
[2] Calling [myImageView setFocusRingType:NSFocusRingTypeNone]
doesn't kill it.
[3] overriding -setImage / -setImageScaling, so that after calling
super's implementation it sets the focus ring as per [2], doesn't
work when you drag an image onto it or change the scaling type (let
alone when you're not changing the image, of course, eg. clicking on it)
[4] overriding -focusRingType, to always return NSFocusRingTypeNone,
doesn't seem to change anything
[5] overriding -setFocusRingType to always set it as
NSFocusRingTypeNone, doesn't seem to change anything
[6] overriding +defaultFocusRingType to always return
NSFocusRingTypeNone, doesn't seem to change anything
... am I completely missing the point here? Or is this a known
NSImageView-specific bug? I searched the archives and the only other
issue people have had with NSImageViews / focus rings is the heavy
redrawing (i.e. draws the ring multiple times, resulting in a darker
ring).
Thanks in advance for any help / medication you can give me,
Ken
- - - - - - - - - -
Dr. Ken Tabb
Mac & UNIX Developer - Health & Human Sciences
Machine Vision & Neural Network researcher - School of Computer Science
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/
Certified non-Microsoft Solution Provider
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden