On 13/03/18 09:00, José Mejuto via Lazarus wrote:
El 13/03/2018 a las 9:21, Mark Morgan Lloyd via Lazarus escribió:>>>
Yes, the modal form appears while the mouse button is held down (for >>>
both GTK2 and Qt).>>>>>>> So, yes, seem that grid expects mouseup> > Is
there a portable way this can be sent? Otherwise I presume I could >
fudge it with something like QueueAsyncCall()... unless that also went>
through before the mouse activity was sorted out.> > I'm fairly keen to
hack this in such a way that it's not tied to one > version of the LCL
since I want this program to be fairly easy to build > even for people
with an old (or no existing) copy of Lazarus etc.
Hello,
I think the proper solution is to instruct GTK2 to use the MOUSE_UP
event, but meanwhile QueueAsyncCall will not be the solution as when the
AsyncCall will be processed grid will be still waiting for MOUSE_UP, so
my solution would be add a MOUSE_UP and MOUSE_DOWN handlers, something
like this in pseudo code:
MOUSE_DOWN: SelectChanged:=false;
ON_SELECT: SelectChanged:=true;
MOUSE_UP: if SelectChanged then Form.ShowModal();
Thanks, I'd just about worked that one out. I'll try later- I'm spending
the day helping with some flocking sheep ;-)
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus