Solved

Resizing Forms ...

Posted on 2000-04-17
5
196 Views
Last Modified: 2010-04-04
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
Comment
Question by:wimmeyvaert
5 Comments
 
LVL 6

Author Comment

by:wimmeyvaert
ID: 2722441
Hi,

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

So, thanx to both !!


Best regards.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2722292
Write this code in your Form's OnCanResize event:

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


Motaz
0
 
LVL 13

Accepted Solution

by:
Epsylon earned 50 total points
ID: 2722298
Hi,

you can use the contraints property:

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

Not sure if this is what you want...

Regards,

Epsylon.
0
 
LVL 1

Expert Comment

by:tomer_engel
ID: 2722325
the constrainta propery is the best solution for this job...
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2722605
:-(
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question