Pergunta

I have a Delphi app with a TImgView32 control (part of Graphics32). I am handing the mouse move and mouse down event, and that is working. The problem is that whenever I use the right mouse button within the image, when I let go of the right mouse button (still within my image--I didn't go outside of the image before letting go)--the left mouse button does not run the button, checkbox, minimize, or any other control's events. It does an extra mouse down event in TImgView32 until click a second time. How can I get mouse clicks to go to the proper control when the mouse is no longer in my image without clicking twice? I compiled with both XE3 and 2007, and the result was the same.

Foi útil?

Solução 2

This proved to be a bug in a third party component and not in Delphi or its VCL library. A bug report has been submitted. If mouse events are captured by a layer, make certain that the image or image viewer resets "MouseCapture", but if only the image needs events and not the layers, set Layers.MouseEvents to false as a work around.

Outras dicas

As a quick and dirty fix you could just simulate a left mouse click at the end of handling the right mouse button event?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top