Solved

widget constraints on a resizing form?

Posted on 2006-06-21
3
243 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

14 Experts available now in Live!

Get 1:1 Help Now