AD
Administrator
Syncfusion Team
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;
}