|
-
Jul 10th, 2004, 06:30 PM
#1
Thread Starter
Frenzied Member
Who Owns the ContextMenu?
If you have a ContextMenu that is used by several, say ListViews, can you determine which ListView the menu was called from? I'd like to do this from one of the menu's MenuItems.
Thanks,
Mike
-
Jul 11th, 2004, 11:04 AM
#2
Lively Member
use the ListView.SelectedItems property array, if you disable multiselect for the list view, simply use it as a single item array: ListView.SelectedItems(0)
Do you think my life is easy?
Do you think it's good to win?
do you think it's nice to kill?
Do you think learning is a must?
Do you think computers are nothing?
Do you think this post is stupid?
Do ypu think we're really humen?
DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !
-
Jul 11th, 2004, 12:23 PM
#3
Thread Starter
Frenzied Member
Umm, I don't get it, maybe I wasn't clear. I have two ListViews and one ContextMenu. Both ListViews use the same ContextMenu. The ContextMenu's MenuItems are Large Icon, Details, Small Icon and List. What I want to do is change the view of the ListView based on what the user selects. But I need to know which ListView the user right-clicked on to bring up the ContextMenu. Not sure if I really need two ContextMenus that do the exact same thing except for the ListView it's acting on.
-
Jul 11th, 2004, 12:25 PM
#4
Thread Starter
Frenzied Member
Reading you post again, TLord, that would work to find out which item in the list view was right clicked, but not which ListView.
-
Jul 11th, 2004, 12:31 PM
#5
Lively Member
use the ListViewItem.ListView read-only property.
This property includes reference to the ListView control that holds this ListView Item.
Do you think my life is easy?
Do you think it's good to win?
do you think it's nice to kill?
Do you think learning is a must?
Do you think computers are nothing?
Do you think this post is stupid?
Do ypu think we're really humen?
DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|