Solved

Read only properties !!! ???

Posted on 1998-09-11
4
157 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 84
bit defender blocks good applications 2 107
Put text in a picture ASP.NET C# 2 68
VBA: Insert New column with specific format type 12 55
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…

726 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