Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4165
Show control in PopupControlContainerTool on toolbar
posted

Hello,

We am trying to implement a search mechanism in WinForms that behaves like an Outlook Search bar.

In a default state it acts like a combo editor, but when you hit the drop down you get a custom User Control

Default State

Drop Down State

I was thinking to use a PopupControlContainerTool with a windows TextBox as a control and when it pops open replace with a custom user control that looks like the above. 

So when the form loads, we create a textbox and add it to the popup container tool (like the code on your tutorial). However it does not show in the textbox in the toolbar menu, just the drop down button. Maybe this is the wrong tool to use but I can't figure out another way to accomplish our desired outcome.

Thanks for you help.

M.

Parents
  • 29065
    Verified Answer
    Offline posted

    Hello and thank you for contacting Infragistics. 

    Rather than a popup container tool, its preferred to use a control container tool. Use a modified version of our UltraComboEditor inside the control container tool. This combo will need to remove it's defaults dropdown button, and add a user control for the dropdown. This will be up to you to decide. If you have a control already built, an instance is all that is needed to be used. 

    I attached a sample demonstrating this and I used a very basic user control to demonstrate this process. 

    Here are some useful settings on the combo that are needed that I set in the form's designer.cs

    this.ultraComboEditor1.ButtonsRight.Add(dropDownEditorButton1);
    this.ultraComboEditor1.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;
    this.ultraComboEditor1.DropDownListAlignment = Infragistics.Win.DropDownListAlignment.Right; 

    Let me know if you have any questions. 

    ToolbarControlContainerTool.zip

Reply Children