You need to implement this programmatically by calculating the position in
the OnSizeChanged override or SizeChanged event.
If the user is not supposed to touch it it's probably best not even to use a
splitter but just calculate the positions and sizes of the controls either
side of the centre.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
> In a window containing two controls divided by a splitter, I want this
> splitter to stay centered when the window is resized.
[quoted text clipped - 3 lines]
>
> Regards, Teis
Teis Draiby - 14 Jan 2005 12:48 GMT
Yes, I want the user to be able to move the splitter.
Why? Is there any disadvantages using splitters that I should know of?
Performance issues e.g..
> You need to implement this programmatically by calculating the position in
> the OnSizeChanged override or SizeChanged event.
>
> If the user is not supposed to touch it it's probably best not even to use a
> splitter but just calculate the positions and sizes of the controls either
> side of the centre.
"Teis Draiby" wrote:
> > In a window containing two controls divided by a splitter, I want this
> > splitter to stay centered when the window is resized.
> >
> > Is there any trick to do this in the Windows Form Designer or do I have to
> > implement this programatically?
Bob Powell [MVP] - 14 Jan 2005 14:07 GMT
> Why? Is there any disadvantages using splitters that I should know of?
> Performance issues e.g..
No. I wondered why you wanted to have a splitter and automatically
reposition it to the center of the form. I figured one or the other but not
both.

Signature
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
> Yes, I want the user to be able to move the splitter.
> Why? Is there any disadvantages using splitters that I should know of?
[quoted text clipped - 18 lines]
> to
>> > implement this programatically?
Teis Draiby - 14 Jan 2005 15:13 GMT
Ah! Sorry,
what I need is to scale both controls equally. I just wanted to make the
question more eh... clear.
Thanks, Teis
> No. I wondered why you wanted to have a splitter and automatically
> reposition it to the center of the form. I figured one or the other but not
> both.