Solved

Resizing Forms ...

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now