-
June 25th, 2007, 01:37 AM
#1
[RESOLVED] How to change the location of a panel during runtime
Hi all,
I am developing an application in which there are 2 pannels lying up and down. under certain condition panel1 will be hidden and pannel2 has to expand till pannel1. while doing so it gives error.
I am using like
pDisplay.Location.Y = 0;
Its giving the error as
"F:\Projects\OldCompuTaught\DEVENG\Template.cs(4162): Cannot modify the return value of 'System.Windows.Forms.Control.Location' because it is not a variable"
Please help...
-
June 25th, 2007, 02:43 AM
#2
Re: How to change the location of a panel during runtime
Originally Posted by rahulsri19
Hi all,
I am developing an application in which there are 2 pannels lying up and down. under certain condition panel1 will be hidden and pannel2 has to expand till pannel1. while doing so it gives error.
I am using like
pDisplay.Location.Y = 0;
Its giving the error as
"F:\Projects\OldCompuTaught\DEVENG\Template.cs(4162): Cannot modify the return value of 'System.Windows.Forms.Control.Location' because it is not a variable"
Please help...
To set the location and size of a panel do like this:
Code:
//sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
panel1.Location = new Point(56,72);
panel1.Size = new Size(264, 152);
Laitinen
-
June 25th, 2007, 02:43 AM
#3
Re: How to change the location of a panel during runtime
try
.Top=<your value>
and
.Left=<your value>
-
June 25th, 2007, 03:36 AM
#4
Re: How to change the location of a panel during runtime
Thanks to you all... With your help my problem is sloved...I am very much thankful to you...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|