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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll down a form????? 2

Status
Not open for further replies.

cyberbiker

Programmer
Mar 16, 2001
431
US
I may be an idiot, but I cannot seem to figure this out.
I am finishing up a program that will update machine parameters. I was told that "20 per group" would be the max.
Being a bit paranoid, I designed the program to handle 22 per grouping. However, I grouping has 27.
I am using a tab strip with a frame as the container and create the number of tabs and controls on the fly as I read either an *.ini file, the registry or a data file (depending on a number of factors). As I read a group I keep track of the number of parameters in the group and if the number exceeds 21 I am attempting to add a scroll bar to scroll down through. I increase the height of the tab strip, frame and scroll bar by the height of each control I add in excess of 21. That works until I reach a total 0f 25 controls then I can no longer add any thing. I cannot increase the size of the form past the size of the screen.
I know I must be missing something pretty basic since it is so common to scroll through a web page.
I can provide more details if anybody has any ideas.
Terry (cyberbiker)
 
If you have a control array in your frame you can move all these controls up or down according to the value of the vscroll control to change the .top property of your controls (a top property of -... will move the control out of the top of your screen)
I have some sample code but cannot get to it at the moment.
 
I will try that. Sounds good at first glance. Thanks a lot
Terry (cyberbiker)
 
simplest:
put the frame on a frame, then just adjust .top of inner frame as nescessary. (Won't go off the form) Tim

Remember the KISS principle:
Keep It Simple, Stupid!
 
I appreciate all the help. But, as usual here, as soon as I have something working, the head programmer changes the requirements. Now I put 20 parameters per tab and create a ...(2) tab for the overflow. Much simpler to program of course since I really only had to add 1 if statement, but it looks goofy to my eyes.
Again thanks for all the help. I read most postings daily and analyze the questions and responses.I am learning a lot from these forums and have applied much of what you guys have taught me.
Terry (cyberbiker)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top