473,379 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

TabControl Change event

I am not sure how to use this even properly. When I have it as follows I
have to click on the tabPage1 for anything to show. TIA.

namespace TabLayout
{
public partial class TabLayout : Form
{
public TabLayout()
{
InitializeComponent();
}

private void tabPage1_Change(object sender, EventArgs e)
{
lblSomeLabel.Text = "TESTING";
}
}
}
Feb 28 '06 #1
4 9140
Well, for starters, I think that you want the SelectedIndexChanged
event of the TabControl, because the TabPage doesn't have a Change
event...?

Feb 28 '06 #2
Yeah, looks like I do. I can't figure out how to use it. Any snip you can
give me?
"Bruce Wood" <br*******@canada.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
Well, for starters, I think that you want the SelectedIndexChanged
event of the TabControl, because the TabPage doesn't have a Change
event...?

Feb 28 '06 #3
In the Visual Studio Designer, open the Properties sliding toolbox and
pin it.

Select the TabControl. Double-check at the top of the Properties pane
that you have the TabControl selected and not a TabPage.

Click on the lightning bolt on the Properties pane.

Double-click beside the entry that says SelectedIndexChanged. Visual
Studio will wire the event for you and create an event handler method,
then switch you to Code view with your cursor inside the method body.

Enter whatever code you want to execute when the selected tab changes.

Note that this code won't run when the tab control is first shown; only
when the selection changes. So, you'll have to set things up for the
default tab page (the first one) to show properly when the form is
first loaded.

Feb 28 '06 #4
Thank you so much Bruce, that is exactly where I needed you to put me. I
appreciate it.

--Jason
"Bruce Wood" <br*******@canada.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
In the Visual Studio Designer, open the Properties sliding toolbox and
pin it.

Select the TabControl. Double-check at the top of the Properties pane
that you have the TabControl selected and not a TabPage.

Click on the lightning bolt on the Properties pane.

Double-click beside the entry that says SelectedIndexChanged. Visual
Studio will wire the event for you and create an event handler method,
then switch you to Code view with your cursor inside the method body.

Enter whatever code you want to execute when the selected tab changes.

Note that this code won't run when the tab control is first shown; only
when the selection changes. So, you'll have to set things up for the
default tab page (the first one) to show properly when the form is
first loaded.

Feb 28 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: R. Rajesh Jeba Anbiah | last post by:
I have Googled a lot, but couldn't still find the answer... I could see, I can trigger the "click" event like: button_object.Click() But, I need to trigger the onChange() of select options. I...
1
by: muhamad kassem | last post by:
hi all i have a program that display the content of the table from sql server this table change . how i can get the change event in this table .
1
by: djam | last post by:
Is there such a thing as a row change event in Win Forms? I can't seem to find anything similar, I'm using CurrentCellChanged but that gets fired mulitple times and its not the correct event for...
3
by: dave | last post by:
I have half a dozen web form radio buttons on a web form. Each of them is set to postback=true. However, if for instance radiobutton1 is already selected and the user selects it again, it performs...
7
by: Markus McGee | last post by:
Hi all, I have a quick question...I believe. On my web page, call it page A, I have a drop downlist with runat server enabled. When the drop downlist change event occurs it repopulates a...
1
by: Carlos | last post by:
Hi all, I need to handle the checked change event for a radiobutton, but without the autopostback property set to true. Is that possible? The objective is to maintain the status of the same...
0
by: =?Utf-8?B?SiBTdHJlZ2Vy?= | last post by:
I have a procedure to increase/decrease the size of the columns in a datagrid proportional to their original size. I want to capture the event if a user manually resizes a column, so I can reset my...
3
by: SimonG via AccessMonster.com | last post by:
Hi, I would like to be able to compare a control's new value with its old value, whenever it is changed by a user. The control holds a numeric value, qty_Sold, when this value changes I need to...
2
by: muddasirmunir | last post by:
I am using vb6. I want to solve one problem to define clearly i will use a simple example. Take a form and put a combobox in it Private Sub Form_Load() Combo1.AddItem "Apple"
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.