• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

Creating a custom control and using Enum?

I'm trying to create a custom label control. The only control that this custom control has on it is another Label. My problem is that I wish to be able to add the "TextAlign" property to the custom control. The Label within the custom control has this property but when I wish to use the custom control, that property is not exposed. I was thinking about creating the "TextAlign" property and then somehow assigning the different positional values to it using an Enum but I don't how to do this or even if it's the best way! How do I do this?
1 Solution
You can change the label to be either friend or public and then you can access it using

BlakeMcKennaAuthor Commented:
Thanks, that worked!
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.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now