I've got a two-dimensional array of physical properties (i.e. AnalysisConstant(0,0) is Methane Molecular Weight, (0,1) is Methane Specific Gravity, (1,0) is Ethane Molecular Weight, etc.) that I'm trying to display on a form. My first thought was to define 105 text boxes and use something like:
Dim i as Integer
Dim j as Integer
Dim k as Integer
for j = 0 to 6
for i = 0 to 14
k = (j * 14) + i + 1
TextBox[k] = AnalysisConstant(i,j)
next i
next j
Of course this doesn't work. Is there some sort of other construct that would do this easily?
I know that in this case I could make one text box multi-line and build a string with imbedded vbCrLf commands that could simulate a table, but I have two other arrays for user input that won't work within strings.
I thought the DataGrid construct would work, but I can't figure out how to set the number of columns/rows in a DataGrid.
David
Dim i as Integer
Dim j as Integer
Dim k as Integer
for j = 0 to 6
for i = 0 to 14
k = (j * 14) + i + 1
TextBox[k] = AnalysisConstant(i,j)
next i
next j
Of course this doesn't work. Is there some sort of other construct that would do this easily?
I know that in this case I could make one text box multi-line and build a string with imbedded vbCrLf commands that could simulate a table, but I have two other arrays for user input that won't work within strings.
I thought the DataGrid construct would work, but I can't figure out how to set the number of columns/rows in a DataGrid.
David