|
-
July 25th, 2009, 07:13 PM
#1
Set Values from one tab to another...
Hi Guys,
This issue is fairly simple and I'm sure there is an easy fix for this.
Basically, I have a form that has a tab control and the default tab in the control has a mailing address. There is another tab for home address. On the default tab, I have a button that simply sets the current values in the mailing address fields to the home address fields on the other tab.
However, this doesn't work unless I activate the 2nd tab and then go back to the first tab to click the button...
private void button6_Click(object sender, EventArgs e)
{
mailingAddressTextBox.Text = homeAddressTextBox.Text;
mailingCityTextBox.Text = homeCityTextBox.Text;
mailingStateTextBox.Text = homeStateTextBox.Text;
mailingZipTextBox.Text = homeZipTextBox.Text;
}
-
July 26th, 2009, 07:21 AM
#2
Re: Set Values from one tab to another...
I dont think there will be any issue regarding this. One thing that I can say is that you might be loading Home Address fields on Tab's activate event. Is this the case? If Yes, then do it on Form's load event and if this is not the case then the code should work.
-
July 27th, 2009, 03:46 AM
#3
Re: Set Values from one tab to another...
For this by default whenever you load the form set the default active window as the second tab windows always and then when you click on the button in the first tab it should work...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|