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. Image for the cookie policy date
close icon

PopupMenu with DropDownBarItem instead of ParentBarItem

Hello, Can you please help me figure out a way to display a DropDownBarItem as a context menu instead of a ParentBarItem. Essentially, I want to do exactly what a PopupMenu does with a ParentBarItem, but use a DropDownBarItem instead. Thank you, Terry

3 Replies

J. J.Nagarajan Syncfusion Team June 1, 2006 09:21 AM UTC

Hi Terry, Popupmenu is similar to the submenu in a main menu. The submenu can be displayed only when clicked on the parentBarItem (say, File -> New). Hence there should a default parentBarItem to display the popupmenu when right-clicked. DropDownBarItem is used to host any custom control (not barItems). The DropDownBarItem can host a PopupControlContainer and you could place your custom control within this PopupControlContainer and set this container to the dropDownBarItem''s dropdown. You can only add dropdownBarItem into the items collection of the popupmenu to display it when right-clicked. Please let me know if you have any questions. Thanks for using Syncfusion products. Thank you, J.Nagaraj


TF Terry Foster June 1, 2006 02:03 PM UTC

I''m not sure that we''re understanding each other. I do understand very well how ParentBarItem and DropDownBarItem work and have used both extensively. What I really want is to have a CheckedListBox control pop up like a typical context menu does. I know I could do this if the PopupMenu class worked directly with a DropDownBarItem object instead of a ParentBarItem. To clarify, I do NOT want to just add a DropDownBarItem that contains a CheckedListBox control to the ParentBarItem of a PopupMenu - I want just the CheckedListBox control to popup and nothing else. Can you help me figure out a way to do this? Thanks, Terry


J. J.Nagarajan Syncfusion Team June 2, 2006 02:42 PM UTC

Hi Terry, I am afraid, in the current implementation of XPMenus Framework it is not possible to add a dropdownBarItem as a host BarItem for the popupmenu. You can use the popupControlContainer and place the checkedlistbox and using ShowPopup () method of PopupControlContainer,display the popup in the mouseup event of a control. Please refer the attached sample. In this sample when you right-click on the RichTextBox you can popup the CheckedListBox control. F44688-Checked_listBox.zip Thank you , J.Nagaraj

Loader.
Live Chat Icon For mobile
Up arrow icon