• 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
cell respond to key events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cell respond to key events


  • Subject: cell respond to key events
  • From: Brad Miller <email@hidden>
  • Date: Thu, 17 Feb 2005 21:54:47 -0700

Is it possible to trap key events in an NSCell and if so, how? I'm running around in circles on something that doesn't seem like it should be hard. I have a subclass of NSButtonCell that defines 3 or 4 states and displays a different image based on the state. What I want to do is make is so that if the cell has focus (the view is an NSMatrix) it will respond to different key events (left arrow is state 1, right arrow is state 2, etc). Is this even possible with a cell?

On a related note, the matrix I have is made up of text field cells. In awakeFromNib I'm swapping one of the rows with my NSButtonCell subclass. Everything works great except for tabbing from a text field cell to button cell. Tabbing works correctly from text cell to text cell, button cell to button cell, and button cell to text cell. Is there any trick in getting the button cell to take focus from the text cell?

Thanks,

Brad

_______________________________________________
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


  • Follow-Ups:
    • Re: cell respond to key events
      • From: Daniel Jalkut <email@hidden>
  • Prev by Date: Re: login item for all users
  • Next by Date: NSTableView and threads...
  • Previous by thread: Re: Live resize bug in NSTextView? (quick follow up)
  • Next by thread: Re: cell respond to key events
  • Index(es):
    • Date
    • Thread