Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

Resizing Forms ...

Hi there,

I need to show a form in my application whiwh can only be resized vertically.
I mean that only the 'height'-property can be changed (not the 'Width'-property)
Can someone help me out with this problem?

Thanx,

The Mayor

BTW, I'm using Delphi 5.
0
wimmeyvaert
Asked:
wimmeyvaert
1 Solution
 
wimmeyvaertAuthor Commented:
Hi,

Both Motaz and Epsylon offered me a good solution, but I prefer the solution Epsylon offered.

So, thanx to both !!


Best regards.
0
 
MotazCommented:
Write this code in your Form's OnCanResize event:

  if NewWidth <> Self.width then
    Resize:= False
  else
    Resize:= True;


Motaz
0
 
EpsylonCommented:
Hi,

you can use the contraints property:

  Constraints.MinWidth := 500;
  Constraints.MaxWidth := 500;

Not sure if this is what you want...

Regards,

Epsylon.
0
 
tomer_engelCommented:
the constrainta propery is the best solution for this job...
0
 
MotazCommented:
:-(
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now