Connecting Tech Pros Worldwide Forums | Help | Site Map

label position

Newbie
 
Join Date: Feb 2008
Posts: 6
#1: Mar 5 '08
how to put a label at a specified position at run time in c#.net

Newbie
 
Join Date: Feb 2008
Posts: 10
#2: Mar 5 '08

re: label position


You can just set the left and top properties of the label like

label1.Left = 100;
label1.Top = 50;

This should do it.

Thanks
Sanat Palia
Newbie
 
Join Date: Feb 2008
Posts: 6
#3: Mar 5 '08

re: label position


Hello,
A label neither has left property nor top property.Please tell me another things to do this.
bye
thank you


Quote:

Originally Posted by sanatpalia

You can just set the left and top properties of the label like

label1.Left = 100;
label1.Top = 50;

This should do it.

Thanks
Sanat Palia

Newbie
 
Join Date: Feb 2008
Posts: 25
#4: Mar 5 '08

re: label position


The label control does have the properties Left and Top. They are hidden from the designer. You can also do it this way:

Expand|Select|Wrap|Line Numbers
  1. label1.Location = new Point(100, 50);
  2.  
Quote:

Originally Posted by navneet gupta

Hello,
A label neither has left property nor top property.Please tell me another things to do this.
bye
thank you

Reply