SplitContainer

O

Oxns

Hi,

I have a windows form with two splitters, both Horizontal.

Anyone know how I can save and restore their position ??. Tried every way I
can thin k of, size, splitterrect etc. and even splitterdistance - but this
always gives me an exception 'distance must be between panel1min and width -
panel2min'. It IS !!!.

Thanks

Graham
 
O

Oxns

Further information:

I have seen that this was (or maybe still is) a known bug !!.
I was trying to restore the splitter settings during the From_Load event -
just after restoring the Form position. This ALWAYS fails.
Restoring the splitter later in the cycle (during a form resize event) seems
to work around the issue.
At Form_Load time, whatever width is applied (using new Size(w,h) or setting
Width/Height directly) seems to have no effect on the controls Size (its 0,0
before and after). Thus when setting the Distance, it fails.

Graham
 
J

Jeffrey Tan[MSFT]

Hi Oxns,

Thanks for your post.

I do not think I understand your problem context very well. Can you give a
better explanation? If you can create simple reproduce project or some
detailed reproduce steps , it will be helpful to improve our issue
understanding.

I look forward to hearing from you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top