Highlighting cells
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