By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,791 Members | 1,569 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,791 IT Pros & Developers. It's quick & easy.

Accessing Controls / User Controls / Tab Controls

P: 2

Let me explain the application

I have - Form > Main Tab Control > Main Tab Page > User Control > Sub Tab Control > Sub Tab Page > User Control > Contols/Text Box.

Form - The main form

Main Tab Control - This contains Main Tab Pages.

Main Tab Pages - Each Tap Page is a separate file. Each Main Tap Page contains a User Control which has a Sub Tab Control.

Sub Tab Control - This contains various Tab Pages [Lets say TabOne, TabTwo, TabThree]. Only the TabOne is different for each Main Tab Page.

Sub Tab Pages - Have various controls - Text Boxes, Buttons etc.

So I want a way to access Controls in the Sub Tab Pages keeping in mind what file is open[Tab Pages in the the Main Tab Control]

Lets say I have a File Save Event from the Main Menu Bar, I need only the contents of the active file to be saved. Simplest form like a webbrowser, when you save the page only the page in the active tab is saved. In my case of course I need to keep track of the Main Tab Control active tab and the Sub Tab Control Active tab.

How do I keep track of it?

In the most simplest forms

Create a Tab Control with a tab page [TP1] . Embed a another User Cntrl - Sub Tab Control in TP1. The Sub Tab Control has tap pages [STP1, STP2]. STP1 has some text boxes, other controls. Now duplicate TP1 thru an event [new files] so that there is TP1, TP2, TP3, ....Now lets say we fire an external event, how do I keep track of the values in textboxes wrt to what Main Tab Page is open.

Should I be following a different approach?

Ideas are welcome!
Jan 8 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 390
I am not sure if this solution will work or not,but try to pass some parameter to your method to identify the page.
Jan 14 '10 #2

P: 2
I found a solution..I`m using Interfaces for the UserControls.
Jan 14 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.