Board index » delphi » How would you so this?

How would you so this?


2003-09-23 07:57:39 PM
delphi214
Hi,
I've got a simple form, some labels and buttons. One of these buttons should
enlarge this form to show some e.g. additional options. I have played around
with changing the forms height to show the rest of these options however
this does not work properly. Sometimes, when using different screen
resolutions or other system font sizes the form shows a scroll bar. When the
user changes the size of the form with the mouse cursor, these additional
options also appear.
How would you do this?
cu,
Michael
 
 

Re:How would you so this?

"Michael Fritz" <XXXX@XXXXX.COM>writes
Quote
Hi,

I've got a simple form, some labels and buttons. One of these buttons
should
enlarge this form to show some e.g. additional options. I have played around
with changing the forms height to show the rest of these options however
this does not work properly. Sometimes, when using different screen
resolutions or other system font sizes the form shows a scroll bar.
You should be able to prevent this happening by setting Visible := False for
the VertScrollBar and/or HorzScrollBar properties of the form.
Quote
When the
user changes the size of the form with the mouse cursor, these additional
options also appear.
Are you sure the form _should_ be resizable if doing so will have no effect
other than to reveal things you want hidden? Set the BorderStyle to
bsDialog if you want to prevent this.
Alternatively:
* If you want to keep the form resizable, make the "hidden" controls Align
to the bottom of the form so they move to stay hidden (or put them all on a
panel that is Aligned in this way, to make management easier). Set Align
back to Top prior to resizing the form in code when you want to reveal them.
* Put all the controls on a panel, and make the panel invisible (until
required).
HTH,
Ian