[Gambas-user] Stack Overflow

Eilert eilert-sprachen at ...221...
Thu Jun 16 12:59:52 CEST 2005


Oops Budi, you misunderstood one thing:


> insert data into it without result object. using TData.Data.Text = 
> "something" would fill all the cell with it. What i needed was fill some 
> cell x and some cell y etc. It's hard. So i came up with idea to use 

In the TableView_Data event, there is Row and Column you can use to know 
which cell is filled "right now". The Data event will be called once for 
each cell to be filled whenever something changes with the TableView. So 
the only thing you've got to do is to look for the cell's coordinates:

if Row = 3 then
	if Column = 4 then
		TableView.Data.Text = "hello"
	end if
end if

will insert a "hello" in Line 4, Column 5, and nowhere else.

In practise, you will keep all your data in one ore more arrays and have 
them filled by this event automagically. The only thing you've got to do 
is to trigger the event by adjusting the number of rows and/or columns 
or by calling Refresh.

Does this become clearer now?

Rolf





More information about the User mailing list