[Gambas-user] Event WebTable.Click

Mayost Sharon sharon at 455.co.il
Wed Mar 1 17:49:03 CET 2023


Thank you very much
I didn't see that there is Data.Control

now
1. Is it possible to combine multiple controls into one cell?
2. If I understood correctly, only controls that have a click event can be integrated into the cell (if I want it to respond to the event)
But only a button control responds to the event
I am attaching an example file

Many thanks again


---------- Original Message -----------
From: Bruce Steers <bsteers4 at gmail.com>
To: Gambas Mailing List <user at lists.gambas-basic.org>
Sent: Wed, 1 Mar 2023 12:50:17 +0000
Subject: Re: [Gambas-user] Event WebTable.Click

> On Wed, 1 Mar 2023 at 12:25, Mayost Sharon <sharon at 455.co.il> wrote:
> 
> > Hello
> >
> > I am trying that when I click on an element inside a cell in the table it
> > will respond to the click event
> >
> > Clicking with the mouse does not trigger the click event
> > Even if I click on the cell and if I click on the button that I put inside
> > the cell
> >
> > Is there a bug? Or I misunderstood what the click event is supposed to do
> >
> > I am attaching an example file
> >
> > Thank you
> >
> 
> you probably need to use Data.Control so it configures properly and not
> just insert a button using Data.Html
> This works and fires the WebTable_Click event okay.
> 
> Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As
> WebTableData)
> 
>  Select Case Column
>     Case 0
>       Data.Background = Color.SetAlpha(Color.Yellow, 192)
>       Data.Text = "Data: " & CString(Row) & "_" & CString(Column)
>     Case 1
>       Dim wb As WebButton = New WebButton(Me)
>       wb.Text = "Button: " & CString(Row) & "_" & CString(Column)
>       wb.Class = "button is-danger"
>       Data.Control = wb
>   End Select
> 
> End
------- End of Original Message -------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: webtable2.zip
Type: application/zip
Size: 18445 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230301/d27427ef/attachment-0001.zip>


More information about the User mailing list