Solved

widget constraints on a resizing form?

Posted on 2006-06-21
3
249 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
[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
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FTP Directory Listing 2 82
multiple DLLs with the same namespace 5 112
Visual studio sees sql server but cannot connect 7 68
Convert money to nchar 4 85
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 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