StrataFrame Forum

The Moving MaintenanceFormToolStrip-problem

http://forum.strataframe.net/Topic791.aspx

By Kari Paukku - 4/8/2006

Hi,

I have a form that has been inherited from an other form that has four elements:

MenuStrip, GradientFormHeader, MaintenanceFormToolStrip and a ThemedGroupBox.

When nothing is added to the newly created form it displays ok. Adding anythin(?) makes the MaintenanceFormToolStrip to move just below the top menu (see: attached PDF).

What might be causing this - unwanted - behaviour?

TIA,

Kari

By Trent L. Taylor - 4/8/2006

.NET Smile is causing the problem.  The best way to resolve this issue is to use a ToolStrip Container.  This will allow you to place the toolstrip in a section by itself.  This control can just be dropped on the form and can be found under the Menus and Toolbars toolbox tab.  Simply drop this control on the form and place the toolstrip in one of the "rafting" areas and then place the remainder of your controls in the content section.  Play with this some and if you don't have any luck let me know.
By Gary C Wynne - 4/8/2006

Trent

PMFJI.

Kari's form is visually inheriting everything. I recently put together some WinForms classes and in one such class, I placed a toolstrip container in the parent form level of my class.

I don't know whether you have actually done this but for me (in the subclassed instance of the form), VS really messed up placement of the toolbar relative to its original location in the toolstrip container itself. So, in any subclasses, the toolstrip did not appear to sit in its allocated space at the top of the container and, the container, for some reason, didn't quite Dock.Fill the subclassed form either.

There may be a perfectly good explanation and workaround for this but, I found that my answer was to create/use all of the parts that were specialised classes eg., Gradient Form Header, Toolstrip, Statusbar etc., that needed to be a part of the new form and then, "assemble" them at design time using a template. This stopped all of the visual inheritance problems and the toolstrip container behaved exactly as I expected it to.

Just my .02c Smile

Best

-=Gary