Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrollable form container for optional fields 1

Status
Not open for further replies.

JFoushee

Programmer
Oct 23, 2000
200
0
0
US
Hi. I have a form where 6 fields are required, and some-20 are optional.

Rather than have one giant form, I'd like a scrollable container that houses the optional fields.

It would look something like this ASCII-art:
Code:
Required fields:
              _______________________
  Name:      [_______________________]
              _______________________
  Company:   [_______________________]

Optional fields:
 _________________________________________
|             _______________________   |^|
| Address 1: [_______________________]  |-|
|             _______________________   | |
| Address 2: [_______________________]  | |
|             _______________________   | |
| City     : [_______________________]  |-|
|_______________________________________|V|

Can this be done in VB 6?
 

Sure.

Just place a frame at the bottom of your Form, and another frame instide the first one, plus the VScrollBar to move the second frame up and down. You will have some fun writing the code to move the second frame, but you can do it.

And either place as many controls as you need at the design time on the second frame, or place them 'on-the-fly' in the code.

I have done it before, so I know you can, too.


Have fun.

---- Andy
 
Now I know, and knowing is half the battle.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top