|
-
May 20th, 2008, 04:03 PM
#1
Newbie - Tabpage
Hi all!
I am trying to code some features in my application. One of them, it is the possibility to double click on the tabpage title, and so, the title becomes editable.
So, the user can type the new tabpage name and when the user press "Enter" key, it turns uneditable again, but now, the new name is displayed.
Is it possible to do it? Someone could help me? What is the event that should I have to take to do it?
Thank you!
-
May 21st, 2008, 03:49 AM
#2
Re: Newbie - Tabpage
Yes it it possible. You have to catch the double click event. Then you have to show a textbox on the position of the TabPage Title. After pressing enter you hide the textbox and set the text from the textbox to the TabPage Title.
Useful or not? Rate my posting. Thanks.
-
May 21st, 2008, 08:34 AM
#3
Re: Newbie - Tabpage
But, how can I get a double click only when the user clicks over the tab name? I only know how to get an general double click over a tab page.
How can I get the position that the textbox should appear?
Thank you!
-
May 21st, 2008, 03:37 PM
#4
Re: Newbie - Tabpage
 Originally Posted by gborges
But, how can I get a double click only when the user clicks over the tab name? I only know how to get an general double click over a tab page.
How can I get the position that the textbox should appear?
Your questions are correct. I wouldn't use such an approach using a given control. Whats a but an easier approach which alos allows a nice hanling. My idea is to use the right click event and to open a contextmenue where the user is allowed to type in a name into a textbox. This name then is used in your Tabpage. This way you dont have any troubles to do it. Creating a contextmenu shouldn't be very complicated and you dont have any problems with positions, textboxsize , which style is to be used, and all that. And a ontextmenue also is a professional way to do it
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
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
|