473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ListBox vs. ListView

Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.

Thanks,
Mike
Nov 18 '08 #1
6 4222
"Mike" <ML****@hotmail.comwrote in message
news:26**********************************@r37g2000 prr.googlegroups.com...
Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.
It does? How do it KNOW that the selections are complete?

(I, for one, welcome our new telepathic list box overlords....)
Nov 18 '08 #2
On Nov 18, 4:32*pm, "Jeff Johnson" <i....@enough.spamwrote:
"Mike" <MLM...@hotmail.comwrote in message

news:26**********************************@r37g2000 prr.googlegroups.com...
Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.

It does? How do it KNOW that the selections are complete?

(I, for one, welcome our new telepathic list box overlords....)
How could it not know? If I click on the first of 100 items and then
shift-click the last item, I think the control needs to know it is
selecting all 100 items or else how could it do it?
Nov 18 '08 #3
"Mike" <ML****@hotmail.comwrote in message
news:c1**********************************@a3g2000p rm.googlegroups.com...
>>Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.
>It does? How do it KNOW that the selections are complete?
>(I, for one, welcome our new telepathic list box overlords....)
How could it not know? If I click on the first of 100 items and then
shift-click the last item, I think the control needs to know it is
selecting all 100 items or else how could it do it?
Well, you didn't specify what type of multi-selection you were using.
There's also the type where you can Ctrl+click items, and do it as many
times as you want.

And you're saying that the first click (on the "anchor" item) doesn't fire
SelectedIndexChanged? I'm having difficulty believing that.
Nov 18 '08 #4
On Nov 18, 4:59*pm, "Jeff Johnson" <i....@enough.spamwrote:
"Mike" <MLM...@hotmail.comwrote in message

news:c1**********************************@a3g2000p rm.googlegroups.com...
>Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.
It does? How do it KNOW that the selections are complete?
(I, for one, welcome our new telepathic list box overlords....)
How could it not know? If I click on the first of 100 items and then
shift-click the last item, I think the control needs to know it is
selecting all 100 items or else how could it do it?

Well, you didn't specify what type of multi-selection you were using.
There's also the type where you can Ctrl+click items, and do it as many
times as you want.

And you're saying that the first click (on the "anchor" item) doesn't fire
SelectedIndexChanged? I'm having difficulty believing that.
First, I said this is when they select multiple "at once". Sorry that
wasn't clear enough for you, but the shift-click is the only way I'm
aware of to do that. With ctrl+click, you pick items one at a time,
not all at once.

Second, I never said that the first click doesn't fire the event. I am
only talking about the shift-click situation. Again, that single click
is not selecting multiple items at one time.
Nov 18 '08 #5
"Mike" <ML****@hotmail.comwrote in message
news:37**********************************@k1g2000p rb.googlegroups.com...
First, I said this is when they select multiple "at once". Sorry that
wasn't clear enough for you, but the shift-click is the only way I'm
aware of to do that. With ctrl+click, you pick items one at a time,
not all at once.
Welcome to the ambiguity of the English language. To you, "at once" meant in
a single action. To me, it meant "without doing anything else in the
application in-between, like clicking on a button." Saying "Shift+click," as
you did in your first reply, makes it perfectly clear, though, and now we're
on the same page, although ultimately I don't think you're going to get the
answer you want.
Nov 18 '08 #6
On Nov 18, 5:19*pm, "Jeff Johnson" <i....@enough.spamwrote:
"Mike" <MLM...@hotmail.comwrote in message

news:37**********************************@k1g2000p rb.googlegroups.com...
First, I said this is when they select multiple "at once". Sorry that
wasn't clear enough for you, but the shift-click is the only way I'm
aware of to do that. With ctrl+click, you pick items one at a time,
not all at once.

Welcome to the ambiguity of the English language. To you, "at once" meantin
a single action. To me, it meant "without doing anything else in the
application in-between, like clicking on a button." Saying "Shift+click,"as
you did in your first reply, makes it perfectly clear, though, and now we're
on the same page, although ultimately I don't think you're going to get the
answer you want.
Yeah, I looked around quite a bit for this already and came up empty.
Just thought I'd post the question as a last resort in case anybody
had an idea.
Nov 18 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mad | last post by:
Hello to all, I am new to vb6 and I have been trying to make a listbox with a horizontal and vertical scrollbar. For example, like the one on the program Address book that is found on all Windows...
4
by: Bernie Yaeger | last post by:
I now know how to gather the file type icons and I'm able to use them in a listview. But a listbox does not have a .smallimagelist or .largeimagelist member, so I don't know how to translate that...
2
by: Kanaiya | last post by:
hello how to put images in either listbox or listview.bye. -- With regards, Gangani Kanaiya.
3
by: Chris | last post by:
I'm able to add a context menu to the right click on a listbox but it does not select the item in the listbox. I would like the context menu before it pops up to select the item that the mouse was...
2
by: John R. | last post by:
I want to have a listbox that shows a checkbox and a textbox. I created a user control that has a checkbox and a textbox in it and have been trying to add it to a listbox but I can't get it to...
4
by: CR | last post by:
In VB6 if I wanted to display a group of records, and possibly allow the user to select one or more records, I would use the ListBox. For example suppose I wanted to display something like this: ...
1
by: Melson | last post by:
Hi May I know what is the differences between vb.net listbox and listview. When should I use listbox or listview. Regards Melson
3
by: thomasp | last post by:
Has anyone got some sample code to do drag and drop from one listbox to another listbox using VB.Net 2005. The below code works for draging and droping one at a time, but not for multiselected...
1
by: The Confessor | last post by:
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:...
2
by: markliam | last post by:
I have a ListBox that is displaying a formatted string based on the contents of a DataSet. The purpose of the listbox is for the user to select an entry to delete, but I'm not sure how to match...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.