converting label to textbox
I am trying to acheive something like the vb functionality. (if you click on the title of your thread it turns into a textbox for quick editing).
Would this be a possible solution:
Inherit from textbox.
Add a subroutine that checks whether textbox is readonly. If its readonly, display a label with the same text.
If i handle the label click event, I can change the textbox to its normal property
Re: converting label to textbox
You can create a custom control which consists of a label and a hidden textbox. Handle the label.click event and show the textbox, hide the label. Handle the textbox.Keypress and leave event such that if the user presses the enter key or leave the textbox, you set the label text = the textbox.text then hide the textbox and show the label again.