Solved

Resizing Forms ...

Posted on 2000-04-17
5
197 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi - replicating a form 8 90
Delphi: ForceDirectory plain function 7 48
I want to use librsync in my Delphi backup application. 3 69
Firemonkey Queue list 1 25
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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

680 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