The Moving MaintenanceFormToolStrip-problem


Author
Message
Gary C Wynne
Gary C Wynne
StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)StrataFrame Beginner (30 reputation)
Group: Forum Members
Posts: 26, Visits: 236
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

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
.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.
Kari Paukku
Kari Paukku
StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)StrataFrame Novice (95 reputation)
Group: Forum Members
Posts: 65, Visits: 820
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

Attachments
MaintenanceMenuMove.pdf (161 views, 42.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search