Hello!
I have a problem. I have to change the size of a control added to a Form when the user resizes the Form. I use the Resize event and change the size of the control in the method which is called with the Resize event. So I implemented the docking behaving of the control because it is a part of a third-party library and it doesn't have the docking property. But if the user changes the size of a Form that the control doesn't fit in the form after resizing so the width must decrease, the control totaly collapses. I solved this with use of the ResizeBegin event. When it is called, the controls size changes to width=1, height=1 and then when the Resize event is triggered, the control get resized to the proper size. Everything goes well but the problem still remains when the user maximizes the Form and then Restores it. In that case the ResizeBegin event isn't triggered and the control does not resize to widht=1, height=1. So what I want is to resize the control to widht=1, height=1 before the Form gets resized when the user Restores the Forms size but I didn't find any event that will do this job. My problem could be solved by overloading a method that is called when the user wants to Restore the Form's size but I didn't find any to do this.
Thanks for any suggestions!
Regards.
I have a problem. I have to change the size of a control added to a Form when the user resizes the Form. I use the Resize event and change the size of the control in the method which is called with the Resize event. So I implemented the docking behaving of the control because it is a part of a third-party library and it doesn't have the docking property. But if the user changes the size of a Form that the control doesn't fit in the form after resizing so the width must decrease, the control totaly collapses. I solved this with use of the ResizeBegin event. When it is called, the controls size changes to width=1, height=1 and then when the Resize event is triggered, the control get resized to the proper size. Everything goes well but the problem still remains when the user maximizes the Form and then Restores it. In that case the ResizeBegin event isn't triggered and the control does not resize to widht=1, height=1. So what I want is to resize the control to widht=1, height=1 before the Form gets resized when the user Restores the Forms size but I didn't find any event that will do this job. My problem could be solved by overloading a method that is called when the user wants to Restore the Form's size but I didn't find any to do this.
Thanks for any suggestions!
Regards.
Comment