954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

forms and panels

Hi everyone,

I have a panel which will be 'filled' with a form in runtime. My question is: how could I determine the size of the panel (becouse I want the form to change its size dinamically). thanks

Chaster
Junior Poster in Training
68 posts since Jun 2007
Reputation Points: 12
Solved Threads: 3
 

Set your panel's Anchor property to Top,Bottom,Left,Right in the properties window so when you resize your form at the runtime your panel will be resized with your form consequently...

FoX_
Junior Poster in Training
53 posts since Mar 2007
Reputation Points: 10
Solved Threads: 7
 
Set your panel's Anchor property to Top,Bottom,Left,Right in the properties window so when you resize your form at the runtime your panel will be resized with your form consequently...

Hi

It is not working in 2003 version because panel has no achor property plz tell me solution.
I am explaining my problem. Actually i want to call different forms into panel and panel size change at runtime according to different conditions and i want form's size also change according to panel size.

Thanks & Regards
Karuna

karunaetn
Newbie Poster
1 post since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

Try to use the following:
m_Panel.Dock = DockStyle.Fill;

Askold
Newbie Poster
2 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

As I understand you fill panel dynamically and you don't know exactly how much controls will be so you want to panel fit with size of controls and so with form, you have two options:
1: set panel scrollable and make it dock into form in fill mode.

2: you have to get size( width x height) of each control you add then resize form to required size where panel Dock option set into fill mode

4M-world
Newbie Poster
4 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You