Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When is the menu gone?
Message
From
14/07/2003 13:17:14
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00809613
Message ID:
00809900
Views:
30
OK Joe, I see what you're getting at now ... I've played around a bit with the ContextMenu and could not find a way to do what you need. So, how about this ... you have another timer that controls how long you wait for a click on the ContextMenu (put the code for this timer in the ContextMenu_Popup eventhandler. I know, that sucks too, but off the top of my head, I can't think of anything else at the moment. Maybe someone else will have some other ideas.

~~Bonnie

>I have a list of running programs in a managment console. The console list is updated on a timer. You can remote control select items by right clicking on the item in the list. I have a dynamic popup/context menu that is appropriate for each list. if the list updates after you make your selection; Worst case: the message is sent to the wrong program Best Case: you have a confusing visual representation in the UI. So I pause the update while the user makes his selection. Everything is cool until you don't make a menu selection. That is you right click the list, the menu comes up, and for whatever reason you click outside the menu and it goes away.
>
>Problem: No way to let the app know restart the timer.
>
>I thought I could check for next level menu items since the top level menu was so bleak by using code below;
>
    Friend Function MenuVisible(ByVal mnuMenu As ContextMenu) As Boolean
>
>        'Dim itm As MenuItem
>        'For Each itm In mnuMenu                        'Check all items
>        ' Of course mnuMenu is not a collection type
>        'Next
>
>        Dim iCount As Int16 = mnuMenu.MenuItems.Count   ' Menuitem count
>        Dim iMenuLoop As Int16                          ' Loop counter
>
>        For iMenuLoop = 0 To iCount                     ' Start counting
>            If mnuMenu.MenuItems.Item(iMenuLoop).Visible Then ' if visible
>                Return True                             ' its visible say so
>            End If
>        Next                                            ' check the next one.
>
>    End Function
>
>But this doesn't work because every item shows as visible wether you see it or not.
>
>Thanks in advance,
>
>>Joe,
>>
>>What do you mean by "pause the update" and exactly what ".selected issues" are you trying to avoid?
>>
>>~~Bonnie
>>
>>
>>>Hi Gang,
>>> I have a regularly updated list that has a context menu. When you open the menu, I pause the update to avoid .selected issues. All is great unless you click off of the menu. And it goes away without a .click. There seems to be no .lostfocus nor a .visible...
>>>
>>>Any help?
>>>
>>>Thanks in advance,
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform