Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Read only properties !!! ???

Posted on 1998-09-11
4
Medium Priority
?
161 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 360 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Suggested Courses

597 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