TTMSFMXGrid Double Click

Hi there,

When you use the DblClick event on the TMS grid and bring up another form (ie to edit that record). Then after you close the form, the grid continues to have focus and does not relinquish it unless you click in the grid again. As you move the  mouse the grid will scroll etc...

This can be easily replicated by adding a DblClick event to the sorting demo and bringing up a simple showmessage.

How can I stop the grid from keeping the mouse focus?

Thanks,
David

Hi, 


Thank you for your feedback, 
we have been able to reproduce this here and have applied a fix that will be available in the next release.

Kind Regards, 
Scheldeman Pieter

Hi there,

I have just installed your latest update that addresses this.

It is certainly better, however the focus is still stuck in the grid after double clicking. The grid no longer scrolls up and down as before, but if you move your mouse over other controls on the form, they do not respond to the mouse move (ie light up) until you click the mouse button either on the grid or on the form again.

You can replicate this by adding an edit box to your sorting demo together with the DblClick event as per my first post. After double clicking on the grid and clicking ok to the ShowMessage move your mouse over the edit box and it will no longer light up.

Are you able to resolve this fully?

Many thanks,
David

We have investigated this here, and the focus will remain on the grid, since double-clicking will also trigger an edit cell functionality. So the focus should be in the editor of the grid. When I click in the added TEdit control the focus changes.

It is also unclear how we should trigger a messagedialog in an OnDblclick event to block cell editing, since editing is done with a combination of a MouseDown / MouseUp which is triggered after an OnDblClick. 

Kind Regards, 
Scheldeman Pieter

Hi there,

Thanks for your prompt reply. I am unsure what exactly it is you are trying to say. I am not using the grid in edit mode. I am using it for viewing only, to view a list of customers, which I then double click to open up in a maintenance form. Hence my replication example was based on the sorting demo, not your editing demo.

After closing my customer maintenance form (having double clicked to open it), the focus stays stuck on the grid and if I move the mouse outside the grid, then other controls do not receive the onenter event, unless I do another click for the grid focus to be relinquished. I have used many different VCL grids in the past and none have this 'sticky' behaviour.

It would be appreciated if you could have another look at this. I'm sure other users will also encounter this in the future.. I can send through a source code example should you need.

Thanks,
David

Hi, 


We have tested this here with the sorting demo, and are able to reproduce this here, we have fixed this and the fix will be available in the next release.

Kind Regards, 
Pieter