Solved

Read only properties !!! ???

Posted on 1998-09-11
4
153 Views
Last Modified: 2010-04-30
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...)
0
Comment
Question by:staffiidba
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Eyal
Comment Utility
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
 
LVL 3

Accepted Solution

by:
fguerreiro_inix earned 120 total points
Comment Utility
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
 

Author Comment

by:staffiidba
Comment Utility
Thanks.
looks like a prob with VB ?
0
 

Author Comment

by:staffiidba
Comment Utility
Not a problem. An inherant feature.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now