473,320 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Form AutoScroll Problem

Hi,

I have a form which contain 2 panels, Master and Detail, Master panel is on
top and Detail panel is at the bottom. In the form, I set Detail panel to
Dock to the bottom and Master panel Dock to fill. As a result, when I do
form resize, Detail's height always retain whereas Master height change base
on form size.

What I want to do now is I want to set a minimum size for the form, so that
if the form got resize small than certain value, the Scroll Bar will visible.
So I set form AutoScroll = True and form AutoScrollMinSize = 400,300 (which
is my form size). Then I have a problem that Master panel suddenly grow to
size 400,300 and I cannot set Master panel size lower than 400,300...and the
Scroll Bar always on.

Sorry if I didn't explain my problem very clear, I should have attach a
simple program to demostrate but I don't see such option open.

To put it simple, I want to put 2 panels to fill up the form, top panel will
resize base on form resize, whereas bottom panel size always retain. And the
form should have scroll bar visible when smaller than minimum size.

Thanks for help in advance.
Nov 21 '05 #1
1 9482
You should be dynamically resizing the controls based on the form size.
Override the form's OnSizeChanged method and layout your child controls to
the formula you like. Use AutoScrollMinSize correctly on the lower panel and
you should be ok.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

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.

"Kent" <Ke**@discussions.microsoft.com> wrote in message
news:51**********************************@microsof t.com...
Hi,

I have a form which contain 2 panels, Master and Detail, Master panel is
on
top and Detail panel is at the bottom. In the form, I set Detail panel to
Dock to the bottom and Master panel Dock to fill. As a result, when I do
form resize, Detail's height always retain whereas Master height change
base
on form size.

What I want to do now is I want to set a minimum size for the form, so
that
if the form got resize small than certain value, the Scroll Bar will
visible.
So I set form AutoScroll = True and form AutoScrollMinSize = 400,300
(which
is my form size). Then I have a problem that Master panel suddenly grow
to
size 400,300 and I cannot set Master panel size lower than 400,300...and
the
Scroll Bar always on.

Sorry if I didn't explain my problem very clear, I should have attach a
simple program to demostrate but I don't see such option open.

To put it simple, I want to put 2 panels to fill up the form, top panel
will
resize base on form resize, whereas bottom panel size always retain. And
the
form should have scroll bar visible when smaller than minimum size.

Thanks for help in advance.

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Yasin Gedik | last post by:
Hello, I have a problem with autoscroll property. I am designing a form for pocket pc 2003 in whidbey, and deploying it to emulator. I set the forms Autoscroll property true and put...
9
by: chris vettese | last post by:
On my subform I have a field in the footer that totals the value of a field. On the main form I have referenced this field. I'm using this field in a calculation on my main form. The problem...
3
by: Hans Karman | last post by:
I have a form (giving details of a person) and a subform (giving details of the person's assets). A search in the form for a particular name using the Find dialog box finds the wanted person. The...
3
by: Pierre Carter | last post by:
Hello, I'm using Response.Write to write text dynamically to a form. My problem is that the text sent to the page is not written at the top of the page, even if all margins are set to zero. I...
2
by: Bernie Yaeger | last post by:
I have a child form that has autoscroll set to true. However, when the mdi parent is maximized and the child form is maximized, no scroll bars appear, even though there is more controls and data...
8
by: Frank | last post by:
Hello, I have a form in which I draw a grid in the paint event. Works fine, except when using the scrollbars. Autoscroll is switched on, I use doublebuffering and userpaint and...
4
by: Bremanand | last post by:
Hi..Am doing Retailer software using VB 6.0 with ms-access.. Actually i have many form(sales entry form,purchase entry form ,stock form, etc..) in my project which all are in MDI except Log in...
1
by: prabuinet | last post by:
hi, I added a form as a control on another form. After adding i want the embedded form to have focus. I tried all combinations but its not working.. Do any one know how to do this. ...
5
by: LamSoft | last post by:
I've got some problem on some form submit problem. In a master page, there is a form tag with the "runat=server" attribute, and a ID called "myForm". In the contentPlaceHolder under that...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.