[Gambas-user] TableView
ron
ronstk at ...239...
Wed Feb 25 05:46:59 CET 2004
On Tuesday 24 February 2004 21:25, Charlie Reinl wrote:
> Salut,
>
> sorry to not stay in the threat, my development Box can't recieve emails.
> Only read them in the web.
>
> If I understood well, I can use the TableView only, if have the same
> Structure as array behind.
> I change the array for changing the Values in theTableView . The UpdateData
> calls the tableview1_data. Is that right ?
>
Yes you read it well but it was my mistake, next is the good code
Sorry Benoit. it's not a bug as mentioned in your reply :)
public sub UpdateData( row as integer, column as integer, text as string)
tblcols[column][row] = text ' this set data for tableview refreshing
tableview1.moveto(row,column)
tableview1.data.text = text ' removed the [row,col]
end
Benoit maked a note about writing direct to the grid, to remove it in the
future, so best is then to write in the array and a
tableview.refresh(row,column) as he sugested.
I changed already now and it works now better then in the past.
> If you have time to take a look to my changed FRequest ( that is a changed
> copy of the original FRequest from Benoit, I just added the way to work
> with) , you will see that I use ( in that case still a GridView ) it to
> store datas, needed to make the query.
>
Because this tableview problem I did to use the GridView. Making it with
several widgets to emulate the tableview. Fixed header and scrolling grid.
> My idea to use the TableView, commes from the property of TableView of
> Rowheaders, which stay if I have so scroll to right. Thats all.
> I do not need to have the possibility to roll back ( to the array or Tabel
> value)
>
Exact I feel so and changed back to the TableView. Less code to emulate it.
> And my main problem is how to fill/use it in CreateColumn and DelColumn,
> where I write to the Grid.
>
> My be my choice to change it to a TableView is not good?
> Or I use it, with the double Data storing ?
>
These part I had to but tblarr.add(columndata,index) ?
Moving the columns is simple swap the rowdata in the grid for two columns till
you arive at the destination column. I did this in jscript client side of the
sql builder.
The double data storing is not a big problem i think. I have now 10 rows /
column(table field).
The code example is the global way I use and are parts of several subroutines
to initialize the tableview for the field properties as you could see in
the screenshots I uploaded. 1 of theme was using the GridView but now is all
in tableview.
> Amicalement
> Charlie
>
Greetings
Ron
More information about the User
mailing list