inherited forms resizing issue
-
ive got an inherited form base class (BannerDialog) that has a banner on top and buttons on the bottom. the banner and buttons are anchored to the form using the ide'd design window. my problem is that on the inherited form (MyDialog : BannerDialog) the banner and buttons dont move when MyDialog resizes.
-
ive got an inherited form base class (BannerDialog) that has a banner on top and buttons on the bottom. the banner and buttons are anchored to the form using the ide'd design window. my problem is that on the inherited form (MyDialog : BannerDialog) the banner and buttons dont move when MyDialog resizes.
-
im not certain what you mean. i currently do not call base.OnResize(). If i do, do i override BaseClass.Resize()? and if so, how do i resize the base class's window size? where do i get the dimentions? *** added *** if i delete the inherited form's "this.ClientSize = new ..." in the Initialize component, and do nothing else, it seems to work. the form snaps to the inherited window's size and anchors properly. but i dont understand why.
-
im not certain what you mean. i currently do not call base.OnResize(). If i do, do i override BaseClass.Resize()? and if so, how do i resize the base class's window size? where do i get the dimentions? *** added *** if i delete the inherited form's "this.ClientSize = new ..." in the Initialize component, and do nothing else, it seems to work. the form snaps to the inherited window's size and anchors properly. but i dont understand why.
well, after toiling around the msdn i found a little blurb stating that controls on inherited forms that have anchor properties MUST be set to PROTECTED and not PRIVATE.. exposing controls is the absolute wrong way to write inherited forms (im no architect, but im pretty sure that breaks the model). -- unless there's a way to block the user from directly accessing the PROTECTED control aside from setting it's anchor. so the solution..? in base.Resize() i simply made the layout recalculations myself. years of vb experience pays off.