| | |
how do i disallow the user from opening the same tab page
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2005
Posts: 38
Reputation:
Solved Threads: 1
hi,
1) how can a user close a tab page including the tab after viewing it??
2) how do i disallow the user from opening the 2 or more of the tab page? (my tab page is opened by button click) i dont want to disable the button after opening 1 tab page.. any other ways to disallow opening the same tab page?
thanks
1) how can a user close a tab page including the tab after viewing it??
2) how do i disallow the user from opening the 2 or more of the tab page? (my tab page is opened by button click) i dont want to disable the button after opening 1 tab page.. any other ways to disallow opening the same tab page?
thanks
Seems to me that, if you're wanting USER action to close the tab page, then you would need to have code that would hide the tab page when a certain event occurs (like a button click or a change to a field value).
Not sure I understand the second question; unless I'm confused by what you refer to as a "tab page", tab controls can only display one page at a time by design. If you're wanting to keep a user from RE-OPENING a previously viewed tab, then you might be looking at some sort of conditional disabling of the page after it has been displayed.
I'm not a good enough coder yet to give you any more technical detail than that, but hopefully the conceptual info will guide you in the right direction.
Not sure I understand the second question; unless I'm confused by what you refer to as a "tab page", tab controls can only display one page at a time by design. If you're wanting to keep a user from RE-OPENING a previously viewed tab, then you might be looking at some sort of conditional disabling of the page after it has been displayed.
I'm not a good enough coder yet to give you any more technical detail than that, but hopefully the conceptual info will guide you in the right direction.
:!: In The Beginning, God; In The End, God. In between, believe whatever you like. :)
•
•
Join Date: Jul 2005
Posts: 38
Reputation:
Solved Threads: 1
hi
thanks for all those replies.
i managed to solve the first question (to close a tab page after viewing) by adding a button to the tab page n writing the click event>> tabControl1.TabPages.Remove(tabPage1);
for the 2nd problem (not to allow user to open the same tab page when one is currently opened), i set conditions to >>
if (tabControl1.TabPages.Contains(tabPage1)) // Check if a tabpage is already opened
{
// To cause no effect when button to open tab page is clicked after one tabpage is opened
}
thanks for all those replies.
i managed to solve the first question (to close a tab page after viewing) by adding a button to the tab page n writing the click event>> tabControl1.TabPages.Remove(tabPage1);
for the 2nd problem (not to allow user to open the same tab page when one is currently opened), i set conditions to >>
if (tabControl1.TabPages.Contains(tabPage1)) // Check if a tabpage is already opened
{
// To cause no effect when button to open tab page is clicked after one tabpage is opened
}
![]() |
Similar Threads
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Create .aspx page at runtime (ASP.NET)
- Can't Change Home Page (Web Browsers)
- page.php?page=1,2,3,4,..inf. (PHP)
Other Threads in the C# Forum
- Previous Thread: problem due to too many forms being displayed/how to display forms neatly?
- Next Thread: conditions problem
| Thread Tools | Search this Thread |
.net access algorithm array barchart bitmap box broadcast c# check checkbox client combobox control conversion csharp custom cyclethruopenforms data database datagrid datagridview dataset date/time datetime degrees development dll draganddrop drawing encryption enum event excel file finalyearproject form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install installer java label list listbox mandelbrot math mono mouseclick mysql operator panel path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox save server silverlight sleep socket sql sql-server statistics stream string table text textbox thread time timer timespan update usercontrol users validate validation visualstudio webbrowser wia windows winforms wpf xml





