Solved

tabcontrol: Problem accessing textboxes on other tabpages

Posted on 2004-09-17
2
276 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 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now