Solved

widget constraints on a resizing form?

Posted on 2006-06-21
3
247 Views
Last Modified: 2010-04-24
I have a simple dialog based form in .net 2005 VC++. I've made the dialog resizable (a property) but now I want to make the widgets on it (buttons, text boxes, etc) move with the resizing dialog. Can I do this with out-of-the-box .net 2005? How?

I may (or may not) want the size of the widgets to resize as well. So maybe my text box will get bigger plus move with a resizing window. Can I do this? How?

If the above can't be done with OOTB .net 2005, are there any good Classes to download to help me here??

Thanks!

Dave P
0
Comment
Question by:aerol
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
ID: 16951259
There are number of container controls which allow to create resizable forms. They are placed in the Container tab of toolbox. Different combinations of TableLayoutPanel, SplitContainer, Panel and FlowLayoutPanel allow to define controls behavour when dialog is resized.
For example, you can add TableLayoutPanel to the dialog, set it's Dock property to Fill, and create number of columns and rows. Dialog controls should be placed into TableLayoutPanel cells. Behavour of control inside of cell is defined by it's Dock and Ancor properties.
Using these controls allow to make resizable forms completely in Form Designer, without writing line of code.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 16951276
BTW, I am talking about C++/CLI applications. For unmanaged application you need dialog layout manager class, there are number of such classes in codeguru.com and codeproject.com.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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…

856 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