How to associate a pop up menu correctly?
-
Hi, I created a web parts control consisting of a listbox and a pop up menu. When the user rightclicks on the listbox, the pop up menu is supposed to appear. However, the menu always seems to be blocked by the listbox e.g The menu seems to be in the background and is partially blocked by the listbox. Something like dragging 1 control on top of the other on a windows form. How do I enable the menu to be displayed on top of the listbox? Below is a code snippet: 'Creates child controls (a menu and a listbox) Protected Overrides Sub CreateChildControls() listbox1.ID = "List1" listitem1.Text = "Testing" listbox1.Items.Add(listitem1) listbox1.AutoPostBack = True Me.Controls.Add(listbox1) AddHandler listbox1.SelectedIndexChanged, AddressOf Listbox1_SelectedIndexChanged menu1.ID = "ContextMenu1" menuitem1.Text = "Acknowledge" menu1.ContextMenuItems.Add(menuitem1) menu1.boundcontrols.add(listbox1) Me.Controls.Add(menu1) End Sub I tried changing the order of the controls but its still the same thing. Any solutions for this problem?
-
Hi, I created a web parts control consisting of a listbox and a pop up menu. When the user rightclicks on the listbox, the pop up menu is supposed to appear. However, the menu always seems to be blocked by the listbox e.g The menu seems to be in the background and is partially blocked by the listbox. Something like dragging 1 control on top of the other on a windows form. How do I enable the menu to be displayed on top of the listbox? Below is a code snippet: 'Creates child controls (a menu and a listbox) Protected Overrides Sub CreateChildControls() listbox1.ID = "List1" listitem1.Text = "Testing" listbox1.Items.Add(listitem1) listbox1.AutoPostBack = True Me.Controls.Add(listbox1) AddHandler listbox1.SelectedIndexChanged, AddressOf Listbox1_SelectedIndexChanged menu1.ID = "ContextMenu1" menuitem1.Text = "Acknowledge" menu1.ContextMenuItems.Add(menuitem1) menu1.boundcontrols.add(listbox1) Me.Controls.Add(menu1) End Sub I tried changing the order of the controls but its still the same thing. Any solutions for this problem?
-