By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

ListView vs. ListBox in my Program

P: n/a
I currently have a listbox in my program which I populate with data from
a random access file as follows:

For T = 1 To HighestPointID
FileGet(1, Point(T), T)
ListBox_Point.Items.Add(T & " Lat: " & Point(T).Latitude...)
Next

I end up with data in the following format in each ListBox line.
1 Lat: 42.5003, Long: -70.9249, Ele 161

The obvious advantage of ListView in Detail mode is that the information
can been presented in a more horizontally compact format, with the labels
shown only at the top of the ListView control.

My question deals with the possibility of another advantage to using
ListView:

Can the user click on any row/column combination in a ListView control
(SubItems as well as Items) and edit the contents, which could then be
passed back to the original array via an event detecting such a change?

Currently the user must select the relevant line in my program's listbox,
at which point the values are copied from the array into three TextBoxes.
After changing the values, the player must click a button to update the
array and regenerate the ListBox.

If a ListView control can ease functionality in that way I'll start
implementing it immediately.

Otherwise, since my lack of familiarity with Collections will make this
first excursion a damnably difficult, I'll put it further down on my to-
do list.

Thanks in advance for any helpful replies.

The Confessor
Jan 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
See the technique here:

In-place editing of ListView subitems
http://www.codeproject.com/cs/miscct...ellEditors.asp

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com

"The Confessor" <in*****@reply.to.group> escribió en el mensaje
news:Xn*********************************@130.81.64 .196...
I currently have a listbox in my program which I populate with data from
a random access file as follows:

For T = 1 To HighestPointID
FileGet(1, Point(T), T)
ListBox_Point.Items.Add(T & " Lat: " & Point(T).Latitude...)
Next

I end up with data in the following format in each ListBox line.
1 Lat: 42.5003, Long: -70.9249, Ele 161

The obvious advantage of ListView in Detail mode is that the information
can been presented in a more horizontally compact format, with the labels
shown only at the top of the ListView control.

My question deals with the possibility of another advantage to using
ListView:

Can the user click on any row/column combination in a ListView control
(SubItems as well as Items) and edit the contents, which could then be
passed back to the original array via an event detecting such a change?

Currently the user must select the relevant line in my program's listbox,
at which point the values are copied from the array into three TextBoxes.
After changing the values, the player must click a button to update the
array and regenerate the ListBox.

If a ListView control can ease functionality in that way I'll start
implementing it immediately.

Otherwise, since my lack of familiarity with Collections will make this
first excursion a damnably difficult, I'll put it further down on my to-
do list.

Thanks in advance for any helpful replies.

The Confessor

Jan 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.