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

Help: Frames? Need to scroll one part of form, but not the other

Status
Not open for further replies.

JediDan

Programmer
May 15, 2002
128
US
Hello again,

I am looking to be able to scroll on part of a form, but not the other. I have database information that automatically scrolls my form now if it gets to long, but I want to have a panel or something in a strip on the side that would have buttons remaining fixed in place.

Do I need to use frames? MDI stuff?

Any help is appreciated!

Thanks.
 
Check out TScrollBox, on the Advanced tab. Move all the components you want scrolled into it.

You probably want to set all four of its Anchors to True, so that it will grow/shrink when the user resizes the form.

Of course, any controls outside the scrollbox should also habve their Anchors set appropriately: For controls to the right, set akRight and clear akLeft; for controls below, set akBottom and clear akTop. -- Doug Burbidge mailto:dougburbidge@yahoo.com
 
Wow, that was easy. Guess I'm not looking hard enough!

Thanks for your help.
 
Dont forget that things in Delphi versions prior to 4 have no anchors.
You can get round this by filling the bits you dont want to scroll with a panel for example and left align it then put the scroll box on the right of the panel and set the scroll box to Align Client.
Steve.

 
> Guess I'm not looking hard enough!

It's a big world. Often there's a simple solution to your problem, but you have no way to find it. Ask someone who _does_ know, and boom, you're there.

> Dont forget that things in Delphi versions prior to 4 have no anchors.

Ooh good point. Messing around with Align is kind of icky at first; but if you don't have Anchors, it's the only way, short of writing an OnResize event for the form (which usually turns out kind of flickery).
-- Doug Burbidge mailto:dougburbidge@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top