The Moving MaintenanceFormToolStrip-problem


Author
Message
Kari Paukku
Kari Paukku
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 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 (256 views, 42.00 KB)
Reply
Gary C Wynne
Gary C Wynne
StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 reputation)StrataFrame Beginner (46 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

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