-
label runtime width
I am trying to set width of labels at runtime.
I tried lablel1.width=Unit.Pixel(50);
and
label1.width=Unit.Point(50);
I even tried lable.controlstyle.width, but nothing seems to work for me .at runtime the width of the label seems to get truncated.can anyone tell me how it can be done successfully.
-
Re: label runtime width
have you tried just
Code:
this.label1.width = 50;
hth,
mcm
-
Re: label runtime width
-
Re: label runtime width
are you sure your actually modifing the right label? is there a label on the page with the id "label1"? Or are you creating it from code? If it IS on the page already when you type
"this.label1" does the auto-complete and code hinting box come up with the available properties for a label object? Perhaps your just setting the width of a reference to a label, not an actual label itself.
hth,
mcm
-
Re: label runtime width
its a pretty complecated thing i am doing.its a sharepoint 2007 site.i am developing a webpart through class library project.there i am creating labels at runtime.everything works, except the label width.