views:

39

answers:

2

Hi All

I have what I consider to be a pretty unique problem here, and no idea how to implement. From what I've seen, there is no documentation, tutorials, samples and/or articles on this. I've spent weeks researching, with nothing to show.

The problem:

I need the user to be able to select the contents of a Label Control at runtime, and edit it.

If this can be done by extending the existing Label control, great! Or, if this requires a whole new Label Control to be created, fine. So be it.

Using a TextBox is not an option I'm afraid.

Any help at all is greatly appreciated!

Thank you,

jase

+3  A: 

If it's just because a look & feel issue you can make a TextBox control look the same as a label would looks like (just guessing since I can't imagine any reason for not using a TextBox).

Claudio Redi
The company I work for is run by uneducated people, who never wish to explain their decisions. The only thing I can think of is the fact that the TextBox has no Transparency property in the designer.
lucifer
Make no sense. something like this, deserves a good explanation. You're not their slave :-)
Claudio Redi
I appreciate your comment Claudio :)
lucifer
Here's my solution: Create a custom TextBox called "EditableLabel" and add Transparency to it. Done.
lucifer
+1  A: 

Could you pop up a window with a text box in it and then have them edit it there, then set the text property of the label based on the edited text box or do you need to edit it in place? You can set the label text at runtime, but for user input you will have to use a text box.

Decker97