Hi all,
My first post but none the less, I might as well ask for help with something I can't figure out.
VS Studio 2010. .NET framework 4.0
I have a MDI main form in which I have added a tab control to. The reason for this is that I want to have a tab for all opened windows much like an internet browser. This tab control is anchored top / left/ right /bottom. So whenever a new form is 'opened', I create a new tab and add the form as a control to the tab. This works fine for me in all respects as it loads the form correctly and all form textboxes etc are resized to the tab size dimensions. My problem arises when I resize the MDI form (like a user might do normally). The form itself doesn't resize with the MDI resize event. I have checked the tab control resize event and it is being invoked by the MDI resize event. but just not the form control resize event. Its not a big deal for me at the moment but I can't figure out how to notify that form that it needs to resize itself.
I thought that whenever the resize event occurs, that I loop through each tab child control and set the width / height of the form control. It doesn't seem to work either. I have tried using dock fill and all the anchor options but neither seem to work for me.
My question is, does anyone know of a workaround for invoking a resize event of a form that is embedded into a tab control? Or have you come across this problem before and see no resolution to it?
Kind regards
Barry
My first post but none the less, I might as well ask for help with something I can't figure out.
VS Studio 2010. .NET framework 4.0
I have a MDI main form in which I have added a tab control to. The reason for this is that I want to have a tab for all opened windows much like an internet browser. This tab control is anchored top / left/ right /bottom. So whenever a new form is 'opened', I create a new tab and add the form as a control to the tab. This works fine for me in all respects as it loads the form correctly and all form textboxes etc are resized to the tab size dimensions. My problem arises when I resize the MDI form (like a user might do normally). The form itself doesn't resize with the MDI resize event. I have checked the tab control resize event and it is being invoked by the MDI resize event. but just not the form control resize event. Its not a big deal for me at the moment but I can't figure out how to notify that form that it needs to resize itself.
I thought that whenever the resize event occurs, that I loop through each tab child control and set the width / height of the form control. It doesn't seem to work either. I have tried using dock fill and all the anchor options but neither seem to work for me.
My question is, does anyone know of a workaround for invoking a resize event of a form that is embedded into a tab control? Or have you come across this problem before and see no resolution to it?
Kind regards
Barry