Solved

Assigning values to form.constraints

Posted on 2001-08-07
2
141 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
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

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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 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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

12 Experts available now in Live!

Get 1:1 Help Now