Scrollbar Question

liquidspaces

Regular
Joined
Nov 19, 2002
Messages
74
Location
Richmond, VA
I'm looking for help on how to code a scrollbar. I've searched the help files, but can't figure out how to "anchor" the scrollbar to the form so they both move together. Can anybody offer some help?

I really appreciate it,
Kevin
 
You can try setting the scrollbar's dock property to 'Right' if I understand
what you mean. I'm not totally sure what you're talking about though.
 
Sorry for the confusion. I'll try to say this the best that I can.

I have a vScrollBar on my form, which is docked on the right side. When I run my program I can move the scrollbar. BUT the form doesn't move with it.

For example, if you were on the internet and tried to scroll down the page the scrollbar would move up and down, but the page wouldn't scroll with it.

Does that make sense?
 
NOTE: This is entirely NON-standard

.NET has added a feature called "autoscroll". To use it draw a listbox on a form then drag it down so that it goes below the form - say about half on/half off the bottom. In the form properties you can set Autoscroll to true and wala! you have an automatic scrollbar attached to the form which acts like the one in a browser.

You could also code this yourself but it would be a major pain. The most common use for scrollbars is to add scrolling to a an area that doesn't provide it automatically. Luckily, the form and Panels now support autoscroll though I can't think of a good reason to use one on a form.

Maybe this will change one day but for now I would NOT design your forms so large that they must scroll. People will laugh at you, I promise :p

-Nerseus
 
Haha...well, I can stomach a good laugh at my expense. Thank you very much for the help, though.

Well, this is the real problem:

I use the tab control to divide up the form into categories. Everything fits on the screen very nicely, unless the user has their resolution set at 600. I don't understand why these people feel the need to use 600 resolution, but they refuse to change. Now, either I need scrollbars to accomodate them in their stubborn situation, or....Is there some way to set the user's resolution?
 
By 600 do you mean 800x600? Or are you confusing with 640x480.
As a general rule, I design for 800x600 or above, but since 640x480
is rarely used anymore, I would say you shouldn't go too far to make
it look good at that res.
 
Yeah, I meant 640X480. I couldn't even remember the right resolution, it's been so long since I've had a monitor that even supported that.

I designed this for 800X600 + , but these old ladies at work who will be doing the data entry can't read the print at that resolution, though I suspect they're lying. (They do crossword puzzles in the paper, and those letters as tiny.)

Anyway, I've been told to fix it so it works for them at 640, but will also work for the others at higher resolutions. What a pain these old folks can be:)
 
Let's hope they don't use Windows XP - they disabled 640x480 for all intents and purposes (they really discourage it).

I can't imagine the old ladies, or anyone, wanting to scroll. In most data entry screens they want everything on one screen - scrolling would just upset them even more. Beware lots of them in packs, at night, when you're alone. :)

But seriously, maybe there's some more tweaking that can be done to squeeze it into 640x480 if that's the goal. Normally you'd want things like that settled up front so that you know what to design for.

Some common techniques for squeezing more room on a control. Note that these are somewhat non-standard but may be helpful:
1. Shrink combo-boxes. Reset their width during drop down only
2. Use grids which look normal for scrolling
3. Collapse frames/panels. The idea is to have a Panel control that's the height of a combobox and display up/down arrays. When you press the down-array, it expands to show the controls inside (drawing on top of other controls)
4. Move only critical "cow-path" fields to the "main" tab. If something is used 20% of the time or less, it's a candidate to move elsewhere
5. Have a "prefill" form. It accepts data only - no drop-downs or other misc read-only data. The idea is to collect info and pass it on to a real dialog box where they can see all of the data, maybe scattered across tabs.
6. Replace option buttons with combobox, if appropriate
7. Your idea here

Anyway, I've dealt with this before and it's never pleasant. Data Entry people come from mainframe worlds where everything is entered on one screen and they don't like popups that require the mouse. If you know it up front, you can code for the "crunch" screens. As you probably know, it's harder to scale down than up.

-nerseus
 
Back
Top