Avatar of caglar_okat
caglar_okat

asked on 

Scroll Bar does not appear when Form resizes


  Hi,

  I am using Delphi 5. I have an MDI application. In child forms I have a Panel (align=alTop), a grid (align=alclient) and another panel (align=albottom).Buttons , editboxes etc. are on those top and bottom panels. Child forms have (borderstyle=bssizeable) .

 Problem:
  When the child forms  are resized, the horizontal scroll bar of the form do not appear even if the form is resized to a smaller width than its original.

 I think this happens because the panels have align properties. They also get smaller with form, so horizontal scroll bar does not appear.

 What can be  a solution to this problem? I want to resize the form but the horizonal scroll bar must be seen when necessary..

Thanks.
Delphi

Avatar of undefined
Last Comment
caglar_okat
Avatar of Scay7
Scay7
Flag of South Africa image

In the onformcreate did you try making it visible := true;
Avatar of caglar_okat
caglar_okat

ASKER


 Unfortunately this doesn't help. The problem is, form doesn't show the horizontal scroll bar because the albottom and altop panels gets smaller when form gets smaller.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_248744
Member_2_248744
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
I just remembered, , The Anchors  property, may be better for this, you can set the Anchors to  akTop  or  akBottom and Align to alNone, and this may do what you need?
Avatar of caglar_okat
caglar_okat

ASKER

Yes, I want the two panels to be at the top and bottom.

I tried doing it with anchors. I set the appropriate anchors values for the two panels and the grid. When using anchors the horz. scrollbar appears (since the panels do not change widths as form gets smaller.)

But there are some  problems with anchors property,
 when I make the form very smaller (the grid is not seen) , the top and bottom panels overlap.(if I use align they do not overlap).
 when the form is too small as the grid can not be seen, if I scroll the form's scrollbar to the right, the grid loses its original distance to the bottom edge (when I make the grid bigger), and gets behind the bottom panel.The grid behaves like it is anchored to the bottom edge (as if there is no bottom panel).

SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of caglar_okat
caglar_okat

ASKER


 Thanks for the answers. I was wondering if there is an easy method for solving this problem other than writing code in some events.
Delphi
Delphi

Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

60K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo