Read only properties !!! ???

Trying to use a Text Box control and create a wrap around it. I need to set the alignment property. BUT. On the initialize of the UserControl, if I set the alignment property in the code, it complains when I want to put the control on to a form with - Read Only property can not be set. ???
When using the ActiveX control wizard, it does not seem to map the property to the constituent control.
Is this a bug ? Or is there another way of doing this.
(I dont want to have to create 2 text boxes on the UserControl with each of them being aligned in a different way and when the user selects the Alignment property I would swap it to the text control that has been aligned in that fashion...)
staffiidbaAsked:
Who is Participating?
 
fguerreiro_inixCommented:
The only way is to create two text boxes. The alignment  property is read/write at the control’s authoring time, and not available at the control’s run time.

Alignment  property is an Ambient property read-only at the control’s run time.

0
 
EyalCommented:
You don't have any other choice. VB can't change this property at run time. the only way i know is to put two controls on the usercontol.

0
 
staffiidbaAuthor Commented:
Thanks.
looks like a prob with VB ?
0
 
staffiidbaAuthor Commented:
Not a problem. An inherant feature.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.