Changing the width of a label - read only error

S

Susan G

I am trying to change the width of a label
programatically depending on certain conditions. When I
try to do this (example lblMyLabel.width = 25) I get an
error that it is read only. Is there a way to get around
this?

Please help,
Susan G
 
M

Mark A. Sam

Susan,

Your syntax is correct. Where are you running the code from?

God Bless,


Mark A. Sam
 
M

Marshall Barton

Susan said:
I am trying to change the width of a label
programatically depending on certain conditions. When I
try to do this (example lblMyLabel.width = 25) I get an
error that it is read only.


In general that should work. Where are you trying to do
this?

Note that setting the control size and position properties
using code must be in units of twips (1440 per inch) so your
25 above would result in an extremely narrow label.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top