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

Trying to make a portion of a form scrollable.

Status
Not open for further replies.

crosstec

Programmer
Mar 7, 2002
6
US
Does anyone know how to make only a portion of a form scrollable (the bottom 1/3, top 1/3, etc.)?

Making the whole form scrollable is no problem, but all I need to scroll is the bottom 1/3 of a form. I can "make" it work by laying a form on top of the bottom portion, with scroll bars enabled on it, but the problem with that is you have to make it "Always on top" and if you move the underlying form, you must make the overlying form follow it.

I also tried using "DEFINE WINDOW", which works perfectly as far as positioning goes because I can make the window a child of the main window. Only problem with that is the scroll bars don't appear for some reason.

Any suggestions on how I can make this work?

Thanks in advance
 
crosstec

I can think of placing a grid with one column ( a big one) and changing the column's currentcontrol to container (the is changed to look like a form and made oversized to show the scroll bars). Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Here are two ways:

Put all your non-scrolling stuff into a container,
In the forms "scrolled" event, reposition the container to the top of the form.

The second way is coming....
 
ok, here it is:

Create the main form with caption "My Main Form"
Create a form with caption "My Scrollable Form Section"
Position it at -1,yPosYouWantOnMainForm and make it as wide as the main form and yPosYouWantOnMainForm less than the height of main form.

Issue command: TakeWindow( "My Scrollable Form Section", "My Main Form" )
(See faq184-2555 for definition of TakeWindow)

Now, you can fine tune the exact positions, and take the sub-form's title off, to make it look all like one form... but the sub-form WILL actually be inside the main form, and will move when you drag the main form around, etc.
 
Sounds like this is what I'm looking for. I'll try it out right away.

Thanks for the response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top