• 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
Highlighting cells
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Highlighting cells


  • Subject: Highlighting cells
  • From: Gideon King <email@hidden>
  • Date: Tue, 25 Dec 2001 01:20:44 +0800

I have a matrix of button cells that I want the user to be able to select from using the keyboard. When the panel they are on is displayed the first time, no matter what calls I make to setSelected, setHighlighted, or setKeyCell, I still can't get control to it using the keyboard (i.e. no blue border, and can't select using the arrows or tab key).

If I click on one of the buttons (which dismisses the panel), next time I open the panel, the behavior is the same.

But, if I use one the key equivalents of one of the cells, then *every time* I open that panel after that, I can see the blue highlighting, and can use the arrow keys to select the button I want. I can also set the selection programmatically, and the blue highlight moves to the selected cell.

Can anyone tell me how I can enable the keyboard selection when I initially open the panel?



Also, I want to allow the user to select the button they want using the arrow keys, then press return to confirm their choice. The standard buttons don't appear to support this (I need to use the key equivalents for shortcut keys). Is there an elegant way to get around this? At the moment, I have an invisible button with a return key equivalent on it which does the job, but it's a bit of a hack.

Thanks



Gideon


  • Follow-Ups:
    • Getting internet connection.
      • From: Rosyna <email@hidden>
References: 
 >Re: Cocoa and 10.1.2 (From: David Remahl <email@hidden>)

  • Prev by Date: Re: loading nib within a nib
  • Next by Date: Getting internet connection.
  • Previous by thread: Re: Cocoa and 10.1.2
  • Next by thread: Getting internet connection.
  • Index(es):
    • Date
    • Thread