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

ToolStripControlHost with UserCotnrol

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi
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 ?

Thanks



ToolStripControlHost_2390c842.zip

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 ?

Thanks


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:

[C#]
UserControl1 UCtrl2 = new UserControl1();
ToolStripControlHost host1 = new ToolStripControlHost(UCtrl2);
this.toolStripEx2.Items.Add(host1);


Please find the simple sample in the following link:
http://websamples.syncfusion.com/samples/Tools.Windows/F76420/main.htm

In this sample Usercontrol2 occupy the exact size of toolStripExContainer.

Please let me know if any concerns.

regards,
Hema



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

;