[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.nebula] Re: How to cancel keyboard event in the Grid?

"Tom Schindl" <tom.schindl@xxxxxxxxxxxxxxx> wrote in message 
news:flvqun$eha$2@xxxxxxxxxxxxxxxxxxxx
> Tom Schindl schrieb:
>> Anders Baumann schrieb:
>>> Hi Tom and Chris.
>>>
>>> Yes, if we could tell the Grid about "disabled cells" that would solve 
>>> the problem with jumping closed cell. But that was just one reason why I 
>>> wanted better control of the cell navigation.
>>> Another reason: In our application you are not allowed to move to a new 
>>> row if you have dirty data in the current row. When the user tries to 
>>> move to a new row, either with the keyboard or the mouse, the 
>>> application will not move the table cursor, but instead tell the user 
>>> that there is uncommitted data in the current row. This design will 
>>> cause flicker with the current Grid implementation, because the Grid 
>>> will first move the focus to the new cell and then the model will put it 
>>> back to the original cell.
>>
>> How do you handle the mouse in this situation, you'll also want to cancle 
>> the mouse events?
>>
>
> What I wanted to say is that if you could "disable cells" this would solve 
> this problem to because when a row is modified you'll have to put all 
> cells beside the ones in the currently active row into disabled mode.
>

Yes, we would also cancel mouse events in this situation.
Yes, I guess we could solve the problem by disabling the other rows. But 
remember that we still need to notify the model about the event, because we 
need to tell the user why the table focus did not move. This could be a 
message in the status bar or in an dialog. How would you solve this problem? 
One solution could be to still fire a selectionChanged event when the user 
moves to a "disabled cell" , but not move the cell focus.

/Anders


> Tom
>
> -- 
> B e s t S o l u t i o n . at
> --------------------------------------------------------------------
> Tom Schindl                                          JFace-Committer
> --------------------------------------------------------------------