Solved

Read only properties !!! ???

Posted on 1998-09-11
4
154 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
ID: 1434271
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
ID: 1434272
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
ID: 1434273
Thanks.
looks like a prob with VB ?
0
 

Author Comment

by:staffiidba
ID: 2492491
Not a problem. An inherant feature.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB 6.0 printer how to align 6 58
How to debug this code 7 56
Copy a row 12 57
Visual Studio search word table and return Cell index 8 48
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

912 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

20 Experts available now in Live!

Get 1:1 Help Now