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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBoxBarItem prevent drop down from closing

Thread ID:

Created:

Updated:

Platform:

Replies:

32911 Aug 10,2005 06:29 AM UTC Aug 15,2005 02:03 PM UTC WinForms 5
loading
Tags: Tools
Sue Harris
Asked On August 10, 2005 06:29 AM UTC

Hi, Is there any way to prevent the drop down from closing when a user clicks on an item in the drop down? I want to be able to specify some of the items in the drop down list to be non-selectable. I previously did this by using a custom ListBox and overriding OnMouseUp in the listbox, not calling the base if the last item selected was a non-selectable, but this no longer works. Thanks, Sue

Administrator [Syncfusion]
Replied On August 11, 2005 04:58 PM UTC

Hi Sue, I am afraid there is no way to prevent the ComboBox drop down from closing.However,you can set the item to be non-selectable by setting the SelectedIndex of that item to -1.I have attached a test sample that illustrates this.Let me know if this meets your requirement. Regards, Guru Patwal Syncfusion, Inc.

Sue Harris
Replied On August 11, 2005 11:51 PM UTC

Hi Guru, Nice try, but not quite what I wanted. I basically am trying to have a tree in the combo box drop list and some items collapse and expand that tree when you click on them. Is it likely that this sort of functionality (preventing the drop down close) will be available in future? Or the ability to tell the combo box to drop down? Regards, Sue

Administrator [Syncfusion]
Replied On August 15, 2005 01:40 AM UTC

Hi Sue, The ComboBoxbarItem can only host a ListControl like ListBox or display items in its ChoiceList collection. It cannot host controls in its dropdown. The XPMenus framework has a specialized BarItem - DropDownBarItem for this purpose. This can have a PopupControlContainer in its dropdown, which in turn can host other controls. Are you referring to the DropDownBarItem here ? Please let us know about this. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Sue Harris
Replied On August 15, 2005 04:31 AM UTC

Hi Guru, No I was actually using the ComboBoxbarItem with a custom ListBox in which I drew my tree (it was a very simplified tree just the expand markers and indentation levels which were draw in the DrawItem event). I''ll have a look at the DropDownBarItem to see if I can use it instead (will it allow me to control when it closes?) Regards, Sue

Administrator [Syncfusion]
Replied On August 15, 2005 02:03 PM UTC

Hi Sue, The PopupControlContainer has the HidePopup and ShowPopup methods that will allow you to hide/show itself. But the PopupControlContainer will automatically close when a node is collapsed/expanded in the TreeView that it is hosting. We intend to add a cancelable BeforeCloseUp event to the PopupControlContainer, that would allow you conditionally close or cancel closing of the PopupControlContainer. Feature Request #357 - Add a cancelable BeforeCloseUp event to the PopupControlContainer We will try our very best to implement this feature at the earliest. We appreciate your patience, and thanks for your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

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

;