I want to enable/disable a menu option depending on wether or not an item is selected in a listview.
Is there some event I can use to tell if an item is selected?
Printable View
I want to enable/disable a menu option depending on wether or not an item is selected in a listview.
Is there some event I can use to tell if an item is selected?
you can use click event of list view...whenever user click on an item its relevant menu would b enable or disable....
well if u could explain a lil more then i couold better give u its answer
Private Sub LiST_Click()
If LiST.ItemData(LiST.ListIndex) = 1 Then
Menu1.enabled=false
End If
End Sub
I guess I'm tired.
Enabling the menu won't be had.
But what can I use to tell when to disable the menu?
I know I can use the lostfocus event.
But I have a Delete Item feature.
When it gets used the listview is still active, but there's no longer a selected item.
I don't understand what you mean by this.Quote:
Originally Posted by longwolf
Under what circumstances should the menu item be disabled? Under what circumstances should it be reenabled? What is/are the menu item(s) that we are talking about?Quote:
Originally Posted by longwolf
The LostFocus event of what control?Quote:
Originally Posted by longwolf
That would be correct, so the user would have to select something else. If something has been deleted, how does that effect your menu? (If, at all)Quote:
Originally Posted by longwolf