By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,083 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,083 IT Pros & Developers. It's quick & easy.

Help with splitters!

P: n/a
I have a form with 3 sections in a vertical arrangement. It's starting to
get a little tall, so I want the user to be able to resize the form (using
the border), and have the middle section scroll.

Right now, I have 3 panels: the top panel I want fixed at 75 pixels high,
and docked Top. The bottom panel I also want 75 pixels high, and docked
Bottom. The middle panel should take up the rest (dock Fill), and have it's
autoscroll set to True.

No matter what configuration of panels/splitters, etc., I try, I cannot get
this to work the way I want it. Any hints?

Also, what is a good rule-of-thumb for form sizes - stick with 640x480?

Thanks,

Derrick
Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Google: "learn html"+"css"

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Derrick" <de***********@hotmail.com> wrote in message
news:aq********************@news20.bellglobal.com. ..
I have a form with 3 sections in a vertical arrangement. It's starting to
get a little tall, so I want the user to be able to resize the form (using
the border), and have the middle section scroll.

Right now, I have 3 panels: the top panel I want fixed at 75 pixels high,
and docked Top. The bottom panel I also want 75 pixels high, and docked
Bottom. The middle panel should take up the rest (dock Fill), and have it's
autoscroll set to True.

No matter what configuration of panels/splitters, etc., I try, I cannot get
this to work the way I want it. Any hints?

Also, what is a good rule-of-thumb for form sizes - stick with 640x480?

Thanks,

Derrick

Nov 16 '05 #2

P: n/a
Google: "learn html"+"css"

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Derrick" <de***********@hotmail.com> wrote in message
news:aq********************@news20.bellglobal.com. ..
I have a form with 3 sections in a vertical arrangement. It's starting to
get a little tall, so I want the user to be able to resize the form (using
the border), and have the middle section scroll.

Right now, I have 3 panels: the top panel I want fixed at 75 pixels high,
and docked Top. The bottom panel I also want 75 pixels high, and docked
Bottom. The middle panel should take up the rest (dock Fill), and have it's
autoscroll set to True.

No matter what configuration of panels/splitters, etc., I try, I cannot get
this to work the way I want it. Any hints?

Also, what is a good rule-of-thumb for form sizes - stick with 640x480?

Thanks,

Derrick

Nov 16 '05 #3

P: n/a
clintonG <csgallagher@REMOVETHISTEXT> wrote:
Google: "learn html"+"css"


How will that help with WinForms? I don't see anything in the OP's
message saying it was a web page.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

P: n/a
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
clintonG <csgallagher@REMOVETHISTEXT> wrote:
Google: "learn html"+"css"


How will that help with WinForms? I don't see anything in the OP's
message saying it was a web page.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Sorry, I should have been more specific. It is indeed Windows Forms, not
webpage. My HTML is just fine :)

What was happening is that after I set the top and bottom panels to Dock Top
and Bottom respectively, I would set the middle panel to Dock Fill. Instead
of filling the middle space like one would expect, the middle panel actually
filled the whole form area, so when I ran and resized the form, you could
see that the top and bottom panels overlapped the scroll bar buttons that I
wanted the user to use. Not cool.

I started a new project, and followed the same steps, but now it works. Go
figure. The only thing I did different was the order in which the panels
were added to the form. Before, I had created the middle panel first, then
added the top and bottom after the fact. This time, I did Top first, then
bottom, then middle.

Sometimes VS.NET amazes me...

Thanks,

Derrick
Nov 16 '05 #5

P: n/a
Derrick <de***********@hotmail.com> wrote:
Sorry, I should have been more specific. It is indeed Windows Forms, not
webpage. My HTML is just fine :)

What was happening is that after I set the top and bottom panels to Dock Top
and Bottom respectively, I would set the middle panel to Dock Fill. Instead
of filling the middle space like one would expect, the middle panel actually
filled the whole form area, so when I ran and resized the form, you could
see that the top and bottom panels overlapped the scroll bar buttons that I
wanted the user to use. Not cool.

I started a new project, and followed the same steps, but now it works. Go
figure. The only thing I did different was the order in which the panels
were added to the form. Before, I had created the middle panel first, then
added the top and bottom after the fact. This time, I did Top first, then
bottom, then middle.

Sometimes VS.NET amazes me...


It's not VS.NET particularly in this case - it's the .NET framework. I
believe that the order in which you add controls matters a lot when
dealing with splitters. There's documentation talking about this, but
it's not terribly clear, IMO.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.