jpvniekerk Active Member Licensed User Longtime User Jun 26, 2012 #1 Probably a noob question... I have a scrollview and want to change the value of a specific cell only - say row(5) and col(3). How can do this in the simplest way possible?
Probably a noob question... I have a scrollview and want to change the value of a specific cell only - say row(5) and col(3). How can do this in the simplest way possible?
stevel05 Expert Licensed User Longtime User Jun 26, 2012 #2 Ths standard scroll view doesn't have cells, presumably you have based your code on an example from the forum. If you let us know which one, someone familiar with it will be able to help you much more easily. Upvote 0
Ths standard scroll view doesn't have cells, presumably you have based your code on an example from the forum. If you let us know which one, someone familiar with it will be able to help you much more easily.
jpvniekerk Active Member Licensed User Longtime User Jun 26, 2012 #3 It is based on Klaus' example SQLiteDB I've looked at the code in this program, but I'm getting confused with all the subs and values returned. I think a very basic statement will also help me understand it a bit better. Klaus - can you shed some light please Upvote 0
It is based on Klaus' example SQLiteDB I've looked at the code in this program, but I'm getting confused with all the subs and values returned. I think a very basic statement will also help me understand it a bit better. Klaus - can you shed some light please
klaus Expert Licensed User Longtime User Jun 26, 2012 #4 In the SQLiteDB example you have following routines: - GetView, returns the Label with the given row and col indexes. Code: Copy Sub GetView(Row As Int, Col As Int) As Label ' Returns the label in the specific cell Dim l As Label l = pnlTable.GetView(Row * NumberOfColumns + Col) Return l End Sub - GetCell, returns the content of the cell with the given row and col indexes. Code: Copy Sub GetCell(Row As Int, Col As Int) As String ' Gets the value of the given cell Return GetView(Row, Col).Text End Sub - SetCell, sets the value of the cell with the given row and col indexes. Code: Copy Sub SetCell(Row As Int, Col As Int, Value As String) ' Sets the value of the given cell GetView(Row, Col).Text = Value End Sub Best regards. Upvote 0
In the SQLiteDB example you have following routines: - GetView, returns the Label with the given row and col indexes. Code: Copy Sub GetView(Row As Int, Col As Int) As Label ' Returns the label in the specific cell Dim l As Label l = pnlTable.GetView(Row * NumberOfColumns + Col) Return l End Sub - GetCell, returns the content of the cell with the given row and col indexes. Code: Copy Sub GetCell(Row As Int, Col As Int) As String ' Gets the value of the given cell Return GetView(Row, Col).Text End Sub - SetCell, sets the value of the cell with the given row and col indexes. Code: Copy Sub SetCell(Row As Int, Col As Int, Value As String) ' Sets the value of the given cell GetView(Row, Col).Text = Value End Sub Best regards.