[Gambas-user] gb.web.gui and Canvas

Bruce Steers bsteers4 at gmail.com
Sun Aug 7 22:21:09 CEST 2022


On Sun, 7 Aug 2022, 16:07 bb, <adamnt42 at gmail.com> wrote:

> On Sun, 2022-08-07 at 13:49 +0100, Bruce Steers wrote:
>
> Currently mouse up and mouse down events only trigger if mouse if over
> object. so if mouse is moved off the object and released no mouseup event
> triggers leaving it in MouseDown state, kinda stops it being able to be
> used as a button.
>
> AFAIK, thats the way all buttons work everywhere. I dont know how many
> times that has saved me from pressing the wrong button.
>

Yeah it's handy and I code it into all my utilities.
Most buttons give mouseup event though even if not over the control, in
gambas I'd do something like.

Public Sub Button1_MouseUp()

  If Not Mouse.Inside(Me) Then Return

End

But at least the mouse up event triggers.
With the HTML onmouseup does not trigger if not over the control


> Perhaps you just want to use the Leave event to restore your button (if
> you need to)
>

Yeah I think it'll have to. Seems normal html buttons work the usual way
but no idea how to configure. I guess it's the browsers doing it
automatically.

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220807/6a653d17/attachment.htm>


More information about the User mailing list