Board index » delphi » Scroll bars won't appear!

Scroll bars won't appear!

I've got a form, with a Panel aligned to Top.

The forms AutoScroll is set to true.

When I re-size the form, so that some of the Panel is obscured, no
scroll bars appear.

If the Panel aligned is set to None, the scroll bars work fine.

Can anyone explain what is going on here?

Any hints on how to make the scroll bars appear when part of the panel
is obscured?
Chuck Gadd
Director of Software Development, {*word*104} FX Communications.
e-mail:-cg...@{*word*104}-fx.com  http://www.{*word*104}-fx.com
Remove the - in front of my email address to send me e-mail.
This prevents automailers from filling my mailbox!
*** I boycott businesses that send me unsolicited email adverti{*word*224}ts ***

 

Re:Scroll bars won't appear!


Quote
Chuck Gadd wrote:

> I've got a form, with a Panel aligned to Top.

> The forms AutoScroll is set to true.

> When I re-size the form, so that some of the Panel is obscured, no
> scroll bars appear.

> If the Panel aligned is set to None, the scroll bars work fine.

> Can anyone explain what is going on here?

> Any hints on how to make the scroll bars appear when part of the panel
> is obscured?
> Chuck Gadd
> Director of Software Development, {*word*104} FX Communications.
> e-mail:-cg...@{*word*104}-fx.com  http://www.{*word*104}-fx.com
> Remove the - in front of my email address to send me e-mail.
> This prevents automailers from filling my mailbox!
> *** I boycott businesses that send me unsolicited email adverti{*word*224}ts ***

By definition an alignment of alTop means that the width of the panel is
always adjusted to be the same as the width of the form. If you want to
do something like having the panel always extend right across the form,
but with a certain minimum width, then handle the form's OnResize event
and set the panel's width to max(ClientWidth, min width wanted).

Chris Jobson

Re:Scroll bars won't appear!


Quote
> I've got a form, with a Panel aligned to Top.
> The forms AutoScroll is set to true.
> When I re-size the form, so that some of the Panel is obscured, no
> scroll bars appear.

If you align Panel to the top of the Form and then you resize the form, the
Panel will be resized automatically with your form.

Quote
> If the Panel aligned is set to None, the scroll bars work fine.
> Can anyone explain what is going on here?
> Any hints on how to make the scroll bars appear when part of the panel
> is obscured?

Set Panel Align to None and position it at the top of your form manually.
If you need to change the size or position of Panel when you resize the
Form, use Form's OnResize event. Every time the portion of Panel becomes
cut off, the scroll bars on your Form will appear.

Hope it helps.

Robert

Other Threads