Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
How to display a context menu fully?
Hi, I am working on a web parts custom control which consists of a label,a list box and a context menu. I bounded the context menu to the list box such that when the user rightclicks on the list, the menu will appear. However, when the menu appears, it is blocked by the listbox. Hence only part of the menu is visible. How do I make the menu to be totally visible and to appear 'on top of' the listbox?
A code snippet is below:
list1.ID = "List1" 'List's ID
listitem1.Text = "Testing" 'List's items
listitem2.Text = "Event"
Me.Controls.Add(label1) 'Add the list as part of the custom ctrl
menu1.ID = "ContextMenu1"
menuitem1.Text = "Acknowledge" 'Menu Items
menuitem2.Text = "Testing"
menu1.BoundControls.Add(list1) 'Attatch menu to the list
Me.Controls.Add(menu1) 'Add the menu to the custom control
The code is in Visual Basic. Advice will be appreciated!