We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Popupmenus manager not working properly.

Thread ID:

Created:

Updated:

Platform:

Replies:

8366 Nov 3,2003 10:45 PM UTC Nov 6,2003 09:12 PM UTC Windows Forms 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On November 3, 2003 10:45 PM UTC

Hi, I am using 1.6.1.8 Popupmenus manager. When a popup menu is assigned to a Groupbox, it is coming up even though when I right click on a control with in the groupbox. 1. Open XPToolbarsAndContextMenus sample. 2. Set the "XPContextMenu on Popupmenusmnager1" to none for richttextbox1. 3. Select the "groupbox1" control and set the "XPContextMenu on Popupmenusmnager1" to popupmenu2 and run it. 4. Right click on the gradient label and notice that the popup menu comes up. In my application, I have a databound grid. popup menu shows up on my grid as well. It should not do display it here. Let me know what is happening. thanks, - Reddy

Arun Srinivasan [Syncfusion]
Replied On November 4, 2003 06:59 PM UTC

Hi Reddy, Yes, that is how context/PopUp Menus will behave. To overcome this, you could listen to the ParentBarItem's BeforePopUp and there you can look for the PopUpMenu's SourceControl and if is is say your grid, then you could cancel the PopUp. Regards, Arun

Administrator [Syncfusion]
Replied On November 4, 2003 08:34 PM UTC

Arun, I added the BeforePopup event handler It is printing "Control = groupBox1" when I right clicked on the gradient label. This is not right. Can you check it out. thanks, - Reddy ----------------------------------- private void parentBarItem2_BeforePopup(object sender, System.ComponentModel.CancelEventArgs e) { Console.WriteLine("Control = " + popupMenu2.SourceControl.Name); } -----------------------------------

Arun Srinivasan [Syncfusion]
Replied On November 6, 2003 09:12 PM UTC

Hi Reddy, Sorry, the SourceControl will return the original control to which the PopupMenu was associated. In order to prevent the Context Menu from showing up when you right click on the grid or any other Child control, you need to assign a dummy context menu. In the XPContextMenusAndToolBars sample, you need to add another PopUpMenu and associate it with the gradientlabel. Now if you right-click the gradientlabel the context menu will not show up, wheras it will if you right click anywhere else in the groupbox. Regards Arun

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;