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

ToolStripControlHost with UserCotnrol

Thread ID:





76420 Sep 5,2008 10:17 AM UTC Sep 9,2008 09:49 AM UTC WinForms 2
Tags: Tools
Eric Ferro
Asked On September 5, 2008 10:17 AM UTC

I got a problem with ToolStripControlHost and UserControl.

Adding a standard dotnet control like a listview in ToolStripControlHost works fine.
Adding a usercontrol the control is not visible.

I attach an example with a listview and a usercontrol embedding a listview. The first works, the second does not.

An idea ?



Eric Ferro
Replied On September 5, 2008 01:04 PM UTC

I found that it is something with MinimumSize of the user control.
IF i change it i can now see the user control.

But i want the hosted control to be exactly the size of the toolStripEx container like it is Fill docked.

How i can do that ?


Hemaladha K [Syncfusion]
Replied On September 9, 2008 09:49 AM UTC

Hi Eric,

Thank you for your interest in Syncfusion Products.

It is possible using ToolStripControlHost class. Please refer the below code snippets that illustrates this:

UserControl1 UCtrl2 = new UserControl1();
ToolStripControlHost host1 = new ToolStripControlHost(UCtrl2);

Please find the simple sample in the following link:

In this sample Usercontrol2 occupy the exact size of toolStripExContainer.

Please let me know if any concerns.



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