Hello everyone,

I was wondering if it's possible to define a resize limit on a
splitter control? Like for example
in a vertical splitter, instead of moving the splitter all the way
from the left edge of the Form
to the right. I want the resize action to stop half-way. Can it be
done?

I tried setting some properties at design-time like this:

scVertical.Panel1MinSize = 300;
scVertical.Panel2MinSize = 100;

If I go beyond these values, I would get an exception during runtime.
I need code similar to this one (which I have implemented on my form):


   private void MainForm_Resize(object sender, EventArgs e)
        {
            /* Prevent the Form from being resized LESS than
               what was originally defined. */
            Control control = (Control)sender;

            if ((control.Size.Height <= OrigHeight) ||
                (control.Size.Width <= OrigWidth))
            {
                control.MinimumSize = new Size(OrigWidth, OrigHeight);
            }

        }


 Any ideas?




Benj

Reply via email to