Solved

tabcontrol: Problem accessing textboxes on other tabpages

Posted on 2004-09-17
2
279 Views
Last Modified: 2011-09-20
I have a VB.Net MDI project with a child form that has a tabcontrol and serveral tabpages on it.  I have textboxes and datagrids bound to several datasets.  I am having a problem getting information that is located in textboxes on other tabpages.  After doing a lot of searching I have read that the solution is to go through all of the tabpages to make them active (aware?) at load time.  Will this work even if there is nothing bound at load time?  Is there a better answer?

the code I have used to step through the tabpages goes like this:
tabOrderEntry.SelectedTab = tabCustomer
tabOrderEntry.SelectedTab = tabBillTo
tabOrderEntry.SelectedTab = tabOrder  
tabOrderEntry.SelectedTab = tabItems  Etc.

Is there a way to make all of the textboxes from all of the tabpages accessable at the same time, or a way to reference them?

Thanks for any help.

Bob C
0
Comment
Question by:RRCaldwell
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 12091608
The problem is that TabPages are not fully loaded until they are visible to save time and resources.

Your workaround is the one I know!
0
 

Author Comment

by:RRCaldwell
ID: 12095302
This answers my Suspicions.

I did find that I could reference items by using the systax:

Me.tabOrderInfo.Controls.Item(51).Text.ToString

This will get the information from the other TabPage when it would not using:

txtInvoiceNo.Text.ToString

I will move up my SelectedTab. SelectedTab, SelectedTab further in my code and see if that cleans up my issues.

Thanks,

Bob C  


0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question