[Gambas-user] Filling a WebTable (need help)
Bruce Steers
bsteers4 at gmail.com
Fri Jul 22 02:53:11 CEST 2022
On Thu, 21 Jul 2022 at 22:03, Claus Dietrich <claus.dietrich at freenet.de>
wrote:
> >Thank you Benoit.
> >I'll get some info on the wiki once i get my head around it.
>
> Hi Bruce
> As Benoit wrote it is filled through the data event and there
> actually not much to do get it work. The following lines are
> put together to make you understand how it works.
>
> Dim Matrix As New Variant[5, 9] '5 stands for the column, 9 for the row
> Dim i as Integer
>
> WebTable1.Columns.Count = 5
> WebTable1.Count = 9 'can be set dynamically
>
> For i = 0 To 7
> Matrix[0, i] = "<p align ='left'
> style='vertical-align:middle'>Col1</p>"
> Matrix[1, i] = "<p align ='left'
> style='vertical-align:middle'>Col2</p>"
> Matrix[2, i] = "<p align ='left'
> style='vertical-align:middle'>Col3</p>"
> Matrix[3, i] = "<p align ='right'
> style='vertical-align:middle'>Col4</p>"
> Matrix[4, i] = "<p align ='right'
> style='vertical-align:middle'>Col5</p>"
> Next
>
> Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As
> WebTableData)
>
> Data.Html = Matrix[Column, Row]
>
> End
>
> Please take note, that I launched a bug report, because the WebTable
> doesn't
> display icons when the web app has been compiled and deployed on a Lighttpd
> Web server.
>
> Regards
>
> Claus
>
Thanks Claus :)
I was unfamiliar with a Data event until now.
I soon figured it out after seeing the light.
Your example is different to mine.
can i put it on the wiki?
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220722/08bf9082/attachment.htm>
More information about the User
mailing list