Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

widget constraints on a resizing form?

Posted on 2006-06-21
3
Medium Priority
?
255 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
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 1000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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…
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses

877 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