[Gambas-user] WebTable Background color of row selection
Mayost Sharon
sharon at 455.co.il
Tue Feb 28 20:28:33 CET 2023
Hello
It is not good that I define the yellow background color in both cells
I want the table to be:
Column 0 has a yellow background color
Column 1 has a white background color
But only when I select a certain row then it will color the entire row I selected to a blue background color
I was able to do what I want but the problem is that it only works when I execute
Me.Reload()
And it doesn't seem successful because it refreshes the whole page every time
Attached is an example of what I did
Is there a better way?
Thank you
---------- Original Message -----------
From: Bruce Steers <bsteers4 at gmail.com>
To: Gambas Mailing List <user at lists.gambas-basic.org>
Sent: Tue, 28 Feb 2023 18:36:26 +0000
Subject: Re: [Gambas-user] WebTable Background color of row selection
> On Tue, 28 Feb 2023 at 18:16, Mayost Sharon <sharon at 455.co.il> wrote:
>
> > Hello
> > No problem green background color
> > The problem is that the row I select then in column 0 is colored with a
> > green background and in column 1 it is colored with blue
> >
> > What should have been that when I select a row then the whole row both
> > column 0 and column 1 should be the same color
> >
> > I am attaching an example again that shows what I mean
> > Select a row in the table and you will see that it marks the selection
> > partly in blue and partly in green
> >
> > Thank you
> >
>
> You need to set the color in column 2 as well.
> The row becomes blue when selected and then is overlayed with
> semi-transparent yellow (so green) but only on 1st column
>
> just set color for the other column too.
>
> 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
> Data.Background = Color.SetAlpha(Color.Yellow, 192)
> Data.Html = "<button Class=\"button is-danger\">" & "Button: " &
> CString(Row) & "_" & CString(Column) & "</button>"
> End Select
>
> End
> Respects
> BruceS
------- End of Original Message -------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.zip
Type: application/zip
Size: 18729 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230228/4a70a988/attachment-0001.zip>
More information about the User
mailing list