[Gambas-user] webhtml click event

Mayost Sharon sharon at 455.co.il
Sun Mar 5 15:02:59 CET 2023


Hello

I am attaching an example that when I click on WebHTML it responds to a click event

It seems to me that the way I did was not successful, maybe there is another advice on how to create the event on a certain control

The problem was because:
A. All gb.web.gui controls do not have a click event such as WEBHTML, WEBIMAGE, WEBLABEL, etc.
B. In order to create an event in WEBHTML I took a WEBBUTTON control that has a click event.
I put the HTML content inside WEBHTML.TEXT and put it:
onclick=\"gw.raise('@1.WebButton2','click');\" onmousedown=event.stopPropagation();

Now when I click WEBHTML it reaches the WEBBUTTON click event

And it's a bit complicated every time to create an additional control for an event. Is there another way?
And also is there a good reason that there are no click events in all the gb.web.gui controls

Many thanks for the help
-------------- next part --------------
A non-text attachment was scrubbed...
Name: html_click.zip
Type: application/zip
Size: 17705 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230305/7eba3f12/attachment.zip>


More information about the User mailing list