Posted 14 years ago by tobias weltner
Avatar
I feel quite stupid and apologize for my questions. Maybe someone can help a newbie...
When I add a tabstrip control (VS 2005), place it into a tabstrip container so it is movable and then choose "reparent controls" (all through smart tag actions), all dockable tool windows will grow in size and cover menu and toolbar once I run the project.

I know it must have something to do with who is parent of whom, but I just can't find a setting for that.

Comments (12)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm not familiar with the Reparent Controls feature. Is that a new VS 2005 thing? What is it supposed to do?


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
Yes.

In VS 2005, you can add menu and toolbar strips.
If you want the strips to be movable/dockable, you need to put them into a container.
Next, you select "fill form" and "re-parent control", all through a little smart tag accessible.
When you now add dock manager and add tool windows, they no longer honor statusbar or menubars.
I tried to set the new container as host parent for the dock manager but then VS 2005 crashes.
Posted 14 years ago by tobias weltner
Avatar
Actually, when I re-parent the controls before I add dockmanager to the project and then try to add it, I get a nasty error message talking about some preload-requirements and stuff...

There seems to be a bug, either in VS 2005 or dock control. When I change dock control parent to the tabstripcontainer and then try to add a tool window, VS 2005 crashes. So somehow the dock control can't use the container as parent. If I re-parented the controls, the container is the default parent so when I add dock manager to the project, it refuses and shows the error message. If I add it before re-parenting, it uses the form as parent and once I change to the container, I get the crash.

Does that help a bit?

[Modified at 05/27/2005 04:06 PM]
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If you don't have any tool windows created yet, you can change the DockManager.HostContainerControl to be any ContainerControl on the Form. So if you have a ContainerControl within your menu/toolbar system, you should be able to set it to that. But again, only if no tool windows have been created yet.


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
Well, yes, but if I do so (and use the Tabstripcontainer as hostcontainercontrol) and THEN add a tool window, VS 2005 crashes altogether...
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Do you mean ToolStripContainer (I assume Tabstripcontainer is a typo)?

If so, notice that when you click on the content area of a ToolStripContainer, it selects a ToolStripContainer.ContentPanel control. Unfortunately that control doesn't inherit from ContainerControl so we can't assign the DockManager to use the ContentPanel as a container. However we can add another ContainerControl as a child of the ToolStripContainer.ContentPanel.

I just did a test of adding a UserControl as a child of the ToolStripContainer.ContentPanel. Then I set the UserControl to DockStyle.Fill. I set the DockManager to use the UserControl as the host. Then I added tool windows and I had everything working great... the toolbars could dock anywhere outside of the docking windows and the docking windows stayed inside of the toolbars.

Make sense? Maybe we'll put together a help topic on this for the upcoming release.


Actipro Software Support

Posted 14 years ago by tobias weltner
Avatar
Yes, a help topic would be great! I feel a little brain-dead tonight but'll try it tomorrow...
Posted 14 years ago by Martin Merkel
Avatar
Hi,
I'm currently drafting a tool that will be build with VS2005, and thus will likely have to make use of the ToolStrip and ToolStripContainer controls. I'm facing a similar problem as described in the original posting, in fact I try to reproduce a screen layout that resembles the Visual Studio IDEs with a tabstrip in the centre of the window and a couple of docking tool windows around it. I tried the user control approach, but then I cannot get the tabstrip added to the layout. Having quite some difficulties getting all together, I could use some hints if somebody did successfully manage this. Anyway, apart from the .chm documentation, is there anything PDF like (or even a tutorial, as I'm new to the UIStudio controls as well) available, this is just easier to read.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Martin... the CHM documentation is the documentation that is available as well as looking at the sample project.

You should be able to do what you were asking about. Make sure you follow the steps as we outline in the help topic on this scenario to get docking working within the ToolStripContainer. Once you do so, ensure that DockManager.DocumentMdiStyle is set to None. Then you should be able to add the TabStrip to the UserControl, set a DockStyle.Fill and have it work like you specified.


Actipro Software Support

Posted 14 years ago by Christophe EHRHARD
Avatar
I have the same problem Martin has. I didn't found the solution how to add a tabstrip to the UserControl. Thanks for some help

Chris
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You should be able to do it in the UserControl's designer or programmatically just by adding it to the UserControl's Controls collection.


Actipro Software Support

Posted 14 years ago by Martin Merkel
Avatar
Chris,
for me this works now, I still do have a bit of problems with sizing the docking tool windows, but only if I build the UI with VS2005 b2, when I use VS2003, no problem. The tab strip I can infact just drop on the user control. That works fine.

Martin
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.