Solved

tabcontrol: Problem accessing textboxes on other tabpages

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
update textboxes with Streamreader 21 44
Receiving a string from a WebService Push 21 47
VB.NET 1 21
Call windows 10 virtual keyboard from windows forms app 2 32
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

13 Experts available now in Live!

Get 1:1 Help Now