Solved

Assigning values to form.constraints

Posted on 2001-08-07
2
149 Views
Last Modified: 2010-04-06
I currently have a minheight & minwidth value set to my main from in a program.

When a button is pressed I need to change these values, but I cant work out how to change the constraints in code.

Please can someone supply me with a coded example.

Thankyou.
0
Comment
Question by:chunky1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
alanwhincup earned 15 total points
ID: 6359902
Just do something like this:

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form1.Constraints.MaxHeight := 300;
  Form1.Constraints.MaxWidth := 300;
  Form1.Constraints.MinHeight := 300;
  Form1.Constraints.MinWidth := 300;
end;
0
 
LVL 1

Author Comment

by:chunky1
ID: 6359946
Why wouldn't it accept that the first time ?

Obviously a bad day !

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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