473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Tabpage Renaming

I have a form that has a
tabcontrol with 5 tabpages. i want to rename the tabpages in runtime.
Actually
i want to right click the tabpage i want to rename and edit the text there
itself. How to acheive it? Any help will be greatlty appreciated.

/Ratan
Feb 10 '06 #1
4 10131
Hi,

"Ratan" <Ra***@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
I have a form that has a
tabcontrol with 5 tabpages. i want to rename the tabpages in runtime.
Actually
i want to right click the tabpage i want to rename and edit the text there
itself. How to acheive it? Any help will be greatlty appreciated.


You do so by changing TabPage.Text , of course as you know already this is
not changeable by the user, you have to implement it. A first idea is to
detect a click on the desired tab, you could check it in the selected_index
event. if that is the one you are looking for, create a Textbox with the
correct size/location and edit it, if you remove the border decorations it
will looks like you are editing the name directry in the tabpage.

An alternate option is to extend tabpage with the desired feature.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 10 '06 #2
Hello Ignacio Machin,
Thx for idea...
but i want this on mouse right click context menu and as u might be aware
that mouse right click does not select the tabpage, it clicked on so its hard
to check which tabpage user has right clicked.
Same problem i am facing for delete the tabpage on mouse right click also.

/Ratan
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Ratan" <Ra***@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
I have a form that has a
tabcontrol with 5 tabpages. i want to rename the tabpages in runtime.
Actually
i want to right click the tabpage i want to rename and edit the text there
itself. How to acheive it? Any help will be greatlty appreciated.


You do so by changing TabPage.Text , of course as you know already this is
not changeable by the user, you have to implement it. A first idea is to
detect a click on the desired tab, you could check it in the selected_index
event. if that is the one you are looking for, create a Textbox with the
correct size/location and edit it, if you remove the border decorations it
will looks like you are editing the name directry in the tabpage.

An alternate option is to extend tabpage with the desired feature.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 13 '06 #3
Hi,
"Ratan" <Ra***@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...
Hello Ignacio Machin,
Thx for idea...
but i want this on mouse right click context menu and as u might be aware
that mouse right click does not select the tabpage, it clicked on so its
hard
to check which tabpage user has right clicked.
Same problem i am facing for delete the tabpage on mouse right click also.


Have you look around for a third party control?

Otherwise you would have to implement your own control
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Feb 13 '06 #4
Have you seen my "Associate a ContextMenu with the TabItem headers of a
Tabcontrol." example?
http://www.dotnetrix.co.uk/tabcontrols.html

If it's not exactly what you want, it should be easy enough to modify.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Ratan" <Ra***@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...
Hello Ignacio Machin,
Thx for idea...
but i want this on mouse right click context menu and as u might be aware
that mouse right click does not select the tabpage, it clicked on so its
hard
to check which tabpage user has right clicked.
Same problem i am facing for delete the tabpage on mouse right click also.

/Ratan
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,

"Ratan" <Ra***@discussions.microsoft.com> wrote in message
news:18**********************************@microsof t.com...
>I have a form that has a
> tabcontrol with 5 tabpages. i want to rename the tabpages in runtime.
> Actually
> i want to right click the tabpage i want to rename and edit the text
> there
> itself. How to acheive it? Any help will be greatlty appreciated.
>


You do so by changing TabPage.Text , of course as you know already this
is
not changeable by the user, you have to implement it. A first idea is to
detect a click on the desired tab, you could check it in the
selected_index
event. if that is the one you are looking for, create a Textbox with the
correct size/location and edit it, if you remove the border decorations
it
will looks like you are editing the name directry in the tabpage.

An alternate option is to extend tabpage with the desired feature.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Feb 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TMB333 | last post by:
I've researched as much as I can on the issue, but I've not found any clearly defined statement that acknowledges that the Hide method for a TabPage object just doesn't do what it's supposed to do....
9
by: Robb Gilmore | last post by:
Hello, This is probably an easy one, but I have not been able to figure it out so far. I have a tab control on a windows forms app. Depending on some business logic, I need to hide/show some...
2
by: JG | last post by:
Hi, I have a windows form with a TabControl on it. It has 3 tabpages on it. I have also coded a button that is supposed to 'add' a new tabpage. The code in that clicked event looks like this:...
2
by: meh | last post by:
I'm not sure if I have the right concept going. I am making a custom TabPage and executing it from a button click event. It works fine I'm just thinking I might be missing the finer points of the...
1
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
3
by: Cynthia | last post by:
I knew that "Hide" doesn't work with Tabpage if I want to hide it. I should use Remove/Add. But I have some other controls in the tabpage which I don't want to use code to dynamiclly create them....
8
by: touf | last post by:
Hi, I've a tabcontrol that contains many similar tabpages (exactly the same structure with different information), the tabpages number isn't known in the design time it depends of the data. Is...
6
by: ray well | last post by:
i want a user to be able to change tab pages thru the keyboard, i tried entering the TabPage.text as '&1 Names', "&2 Addresses', etc., so that the user can change pages by type ALT 1, ALT 2, on the...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello gurus, I want to have a Form with a TabControl, this TabControl will contain TabPage that has controls in it, this TabPage is prepared at design time. I want in runtime to duplicate the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.