Re: NSImageView + Text
Re: NSImageView + Text
- Subject: Re: NSImageView + Text
- From: Uli Kusterer <email@hidden>
- Date: Wed, 30 Nov 2005 12:57:29 +0100
Am 30.11.2005 um 00:20 schrieb Mijobee:
I'm writing a hot key view that allows users to click on the cell
and then press a key combination which is then displayed in the
view. I've considered a few different design approaches but am not
sure the best way to implement it. Do I just need to subclass
NSImageCell, implement my keyDown and text drawing logic and write
a simple NSControl subclass or do I also need to subclass
NSImageView for my control? I'm trying to avoid piling controls on
top of each other but if that's really the best way then I'm open
to it.
Do whatever works best for you. If you don't need a cell at all
(e.g. you don't plan on having a table view where one column uses
your keyboard shortcut cells, or an NSMatrix of such cells) it may
even be easier and more efficient to just write an NSView subclass
that has all that behaviour.
> I know how to do the key translation, glyph lookup, etc. Thanks
in advance.
I'd be interested in that code. Currently I'm using CocoaHotkeys3
from Rogue Amoeba, IIRC, but it requires a look-up-table in your
application's resources for each language to translate the virtual
key codes back to the actual key names. How are you doing that?
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
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