> I'm using Visual Studio 2008 using VB. and this is a GUI
> Windows Forms Application. Hope that answers your question. I want the
> values in the array to be displayed on the screen.
I have an array with to columns (Year and Value).
I have from 15 to 20 rows, each with a year (such as 2001,2002, etc.) and a
corresponding piece of data. The number of rows and/or columns might be
different for each array.
I just want to find the simplest, easiest way to display the data on the
screen,much like a "table" in MSWord or on a web page. No modifications by
user at all.
> > I'm using Visual Studio 2008 using VB. and this is a GUI
> > Windows Forms Application. Hope that answers your question. I want the
[quoted text clipped - 11 lines]
> values to display (2 columns, 20 rows). Does the user need to see all 40
> values at once?
Sylvain - 11 Mar 2008 21:42 GMT
Stephen wrote on 11/03/2008 20:42:
> I have an array with to columns (Year and Value).
> I have from 15 to 20 rows, each with a year (such as 2001,2002, etc.) and a
[quoted text clipped - 4 lines]
> screen,much like a "table" in MSWord or on a web page. No modifications by
> user at all.
so, a basic (win32 driven) ListView control in 'details' mode
with 2 columns is not suitable ? it does not have enough '.'
in its name ?
Sylvain.
Stephen - 11 Mar 2008 23:06 GMT
That may work, but how do you "bind" the cells of the Listview Control to the
elements in the array so the data can be displayed?
> Stephen wrote on 11/03/2008 20:42:
> > I have an array with to columns (Year and Value).
[quoted text clipped - 11 lines]
>
> Sylvain.
Sylvain - 11 Mar 2008 23:43 GMT
Stephen wrote on 11/03/2008 23:06:
> That may work, but how do you "bind" the cells of the Listview Control to the
> elements in the array so the data can be displayed?
I do not "bind" data!
bind means additional (big) things to handle data (2 x 20 int data!),
heavy exchanges and marshalling between container and 'displayer',
and so on.
I just insert data into the list, something like:
for line in lines
ListView_InsertItem(..., table[line][0])
ListView_SetItemText(..., line, 1, table[line][1])
end
Google wil certainly have tons of sample, you can start with
<http://btmtz.mvps.org/listview/> to get the VB macro needed
to communicate with the list.
Sylvain.
btw, I do not know VB so lines above are not valid code.