Am 25.01.2017 15:45, schrieb Benoît Minisini: > Le 25/01/2017 à 15:33, Rolf-Werner Eilert a écrit : >> >> The only thing I could not make out is how to control the tableview. As >> there is no treeview and no listview, I would use tableview to replace >> both of them. No real problem, but >> >> - How can I determine the number of rows and columns >> - How can I add contents >> - How can I delete contents / rows >> >> Could you explain in a few lines? >> >> Regards >> Rolf >> > > WebTableView does not store any contents. It just raises a 'Data' event > for each cell, and you must fill the 'Data' argument of the event > handler with the cell contents. > > But before that, you have to define the number of rows and columns. > > The number of rows is defined by the WebTableView.Count property. > > The number of columns is defined by successive calls to the > WebTableView.AddColumn(<title>,[<width>,<alignment>]) method, or by > setting the WebTableVieW.Columns.Count property and the properties of > each column. > > The WebTableView displays only the first 100 rows. It loads the other > rows when scrolling as needed. > > If you want to add or delete rows, you have to redefine the Count > property. That will trigger a refresh, and call the Data event accordingly. > > The Mode property allows to switch between no selection / single > selection / multiple selection modes. > > There is no column click / sorting feature yet. > > Regards, >
Thank you very much, that makes it much clearer. Now I have a Button1 and a WebTable1 Public Sub WebButton1_Click() WebLabel1.Text = "Button geklickt" WebTable1.AddColumn("Spalte 1") WebTable1.AddColumn("Spalte 2") WebTable1.Count = 5 End Public Sub WebTable1_Data(Row As Integer, Column As Integer, Data As WebTableData) Data = CStr(Row) & "-" & CStr(Column) End But it says "circular reference detected", and nothing appears in the tableview. What is wrong? Rolf ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user