| | |
how do i disallow the user from opening the same tab page
Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 animation array bitmap box c# check checkbox client combobox control conversion csharp customactiondata database datagrid datagridview dataset datastructure date/time datetime datetimepicker degrees directrobot dll draganddrop drawing encryption enum excel file filename files form format forms function gdi+ gis gtk hash image input install java label list mandelbrot math mouseclick mp3 mysql native operator outlook2003 packaging path photoshop picturebox pixelinversion pixelminversion post print process programming radians regex remoting richtextbox safari server sleep snooze socket sql statistics string table tables tcp text textbox thread time timer treeview update usercontrol usercontrols validation visualstudio webbrowser webcam wfa wia winforms wpf xml





