473,387 Members | 1,520 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,387 software developers and data experts.

intro to scrollbars

Hi all,

I'm trying to learn how to use scrollbars (in particular vertical
scrollbars) in windows forms. However every code sample I've looked at
or article I've read seems to miss out stuff.

I was wondering if anyone knows of a real dummies guide to using
VScrollBar on Windows Forms or could offer their own help?

Thanks,

John

Feb 1 '06 #1
3 1109
See over there http://www.syncfusion.com/faq/windowsforms/Default.aspx
I'm trying to learn how to use scrollbars (in particular vertical
scrollbars) in windows forms. However every code sample I've looked at
or article I've read seems to miss out stuff.


---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Feb 1 '06 #2
Hi all,

I've read a wee bit into programming scrollbars, but I still can't
solve my problem.

I want to specify a maximum size for my form and if the largest y value
of my controls is greater than this then I want to start scrolling (and
not allow the user to increase the size).

ie.

if ((lastControl.Location.Y+lastControl.Size.Height) > maxY)
{
// set form height= maxY
// turn on auto scroll
// disable resizing
}

The following article seems to be the converse of this;

http://www.samspublishing.com/librar...seqNum=67&rl=1

but I'm still not sure what to do.

Can anyone suggets anything?

Feb 7 '06 #3
Funny how when you try to explain something to someone in order to ask
for help, you end up solving it yourself.

For anyone who may be interested, this is what I did;

1) set a maxiumum height for the Form
2) turned on autoscroll
3) // found last Control, c
int yVal= c.Location.Y + c.Size.Height;
if (yVal > this.MaxiumSize.Height)
this.Height= this.MaxiumSize.Height; // this is the form
else
this.Height= yVal + someVal; // someVal just a clearance space

easy eh?

Feb 7 '06 #4

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

Similar topics

2
by: Konrad Koller | last post by:
For a card playing game I constructed a layout of 49 playing cards (size of each: x=71, y=96) which are arranged in a 7X7 matrix side by side. Accordingly the pysical size of the Canvas is x=71*7,...
6
by: adrien | last post by:
Hi, (also posted in netscape.public.mozilla.browser) i use netscape 7 and want to hide the scrollbars of the window when something happens. I tried this: window.scrollbars.visible=false...
24
by: Nobody | last post by:
Okay, you are all so smart in here. Answer me this: IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I...
5
by: Dennis M. Marks | last post by:
My script opens a window that is supposed to be resizable and scrollable. I am on a Mac. With IE 5.1.7 it works fine. With Netscape 6 there is no scroll bar. I am able to resize it smaller than the...
14
by: Jorg Matter | last post by:
Hello I should like to define the colors of the scrollbars for divs with overflows set to auto. I have a design with black background and white text. Now the scrollbars do not look very nice and...
1
by: Andi Plotsky | last post by:
I have a subform where I dynamically change the SourceObject dependent upon the User's response to questions on the Main form. My problem is that the scrollbars do not show up on either the Main...
2
by: needin4mation | last post by:
Does anyone know what would cause a popup with scrollbars=1 to suddenly lose its scrollbars? I have a popup from window.open (....scrollbars=1..) and it used to be a normal window that would have...
6
by: shapper | last post by:
Hello, When styling a DIV as follows: <div id="intro" class="Intro">Some intro text</div> Should I use a class: ..Intro {...} Or:
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.