ToolStripControlHost with UserCotnrol

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

2 Replies

EF Eric Ferro 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



HK Hemaladha K Syncfusion Team 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



Loader.
Up arrow icon