Symbian
Symbian OS Library

FAQ-0231 Select/deselect behaves strangely in multiple select lists

[Index][spacer] [Previous] [Next]



 

Classification: Java Category: AWT
Created: 06/08/99 Modified: 06/22/2001
Number: FAQ-0231
Platform: ER5

Question:
In Sun's JDK, you can select/deselect an item in a multiple select list by clicking successively on it, but with EPOC Java you can only make one state change without having to defocus the mouse/pointer.

Answer:
This is a known defect. It will be fixed in future Java releases. Unlike with single selection lists, EPOC Java uses ticks rather than highlighting to indicate multiple selection in a list. However, as currently implemented, checking or unchecking an item with the mouse/pointer causes it at the same time to be highlighted, at which point it becomes unresponsive to further mouse/pointer events, even though ItemEvents continue to be generated. In addition an ActionEvent is generated whenever a highlighted item is clicked on.
A work around for the user is, once an item has been highlighted, to use the enter key to toggle it between selected and deselected. However this does bring with it the additional problem for the developer that use of the enter key in this way generates an ActionEvent rather than the expected ItemEvent. A further complication is that toggling can also be achieved with the space bar, but with no events generated.