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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamic Resizing of DropDown User Control

Thread ID:





16881 Jul 26,2004 09:12 PM UTC Jul 26,2004 10:14 PM UTC WinForms 1
Tags: GridControl
Felix De Herrera
Asked On July 26, 2004 09:12 PM UTC

I can get my own user control to show up and function without problem. However, I need to allow the user to resize the dropdown window during the dropped state. I do not want to use the dropdown form since it does not mind the bounds of the user''s screen. How can this be done. Just resizing the user control works if you close the dropdown and reopen it, but I need to resize dynamically. I appreciate any help. Thanks.

Administrator [Syncfusion]
Replied On July 26, 2004 10:14 PM UTC

In the renderer.DropDownContainerShowingDropDown, set the parent form''s FormBorderStyle to sizable and subscribe to its SizedChanged event. In the renderer.DropDownContainerCloseDropDown, unsubscribe to the event. In the event handler, size both the user control and the container. // in renderer.DropDownContainerShowingDropDown Form f = (Syncfusion.Windows.Forms.PopupHost)this.DropDownContainer.Parent; f.FormBorderStyle = FormBorderStyle.Sizable; f.SizeChanged += new EventHandler(user_SizeChanged); // in renderer.DropDownContainerCloseDropDown Form f = (Syncfusion.Windows.Forms.PopupHost)this.DropDownContainer.Parent; f.SizeChanged -= new EventHandler(user_SizeChanged); //the handler private void user_SizeChanged(object sender, EventArgs e) { this.DropDownContainer.Size = this.DropDownContainer.Parent.Size; ddUser.Size = this.DropDownContainer.Parent.Size; }


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon