|
-
Feb 16th, 2008, 10:34 AM
#1
Thread Starter
Fanatic Member
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
-
Feb 16th, 2008, 10:40 AM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|