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.
LVL 6
wimmeyvaertAsked:
Who is Participating?
 
EpsylonConnect With a Mentor Commented:
Hi,

you can use the contraints property:

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

Not sure if this is what you want...

Regards,

Epsylon.
0
 
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
 
tomer_engelCommented:
the constrainta propery is the best solution for this job...
0
 
MotazCommented:
:-(
0
All Courses

From novice to tech pro — start learning today.