I'm trying to display a WebBrowser Control inside the Ribbon Tab (WinToolbars 2008.1). To accomplish this I have used a ControlContainerTool with the WebBrowser control inside. The ControlContainerTool is placed as the only one tool inside a ToolGroup (which also is the only ToolGroup in this Ribbon Tab).
What I need now is a way to configure the Ribbon,ControlContainerTool or WebBrowser Control to use the complete width of the Ribbon for display, so the whole Ribbon Area (except the TabStrip Area) displays the Browser.
I tried to set the Spring - Property of the ControlContainer to true, and also the Dock-Property of the BrowserControl to Fill, but it didn't work.
It would also be acceptable to set a fixed Width (too large to be ever displayed on any screen) for the Browser Control and living with the fact, that the rest of the page is simply not visible, but when the width of the Browser is larger than the Ribbon's width - the Ribbon automatically hides the Control Container only displaying it when the user presses on a DropDown Button displayed instead.
I hope I have been able to explain what I am trying to do and also that there is some Solution to my problem.
You can try to set the Width of the Control being contained to increase the size of the tool. If the tool cannot fit in the ribbon, the group will collapse to a drop down button. When the drop down button is clicked, the full group will be displayed in the drop down.
Thank you for the quick answer,
however it didn't help much, because I don't want the group to be collapsed to a drop down button. Is there a way to disable the collapsing of a ribbon group?
I found it out by myself. For those interested in doing something like this, I describe here what I did:
I have set the CanCollapse Property of the respective group to false, and registered an event handler for the Resize-event of the main form of my application, which changes the width of the contained browser control to match the width of the window.
It's not a very elegant solution since I would have preferred some kind of Property on the Toolgroups/Tools like the standard Dock property (set to Fill), but it works fine for me.
Now I would like to hide the Toolgroup Caption area, so that the Control container uses the whole (vertical) space of the ribbon area. I found a thread on this forum describing how to hide the Toolgroup-caption by implementing a Creation Filter (which I did) but what I really need is to hide the _area_ where the Caption is displayed, so the ControlContainer can use this space too. Is there any posibility to do this?
The only way I see to be able to make the ControlContainerTool occupy this space is to change the creation filter you have to not only remove the caption element, but to also increase the height of the tool's element.
Thank you for the info, I tried that, and now it works perfectly!