473,322 Members | 1,405 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,322 software developers and data experts.

Changing Tab Pages

I have a page with 2 Tabbed Pages on them (TabPage1, TabPage2).

I am on TabPage1 and when selecting something on the page I am displaying
information on TabPage2 and then want to go to TabPage2, but it doesn't
work.

I tried:

EmailFrom.Text = ds.Tables("Emails").Rows(row)("from_address")
EmailTo.Text = ds.Tables("Emails").Rows(row)("to_addresses")
CC.Text = ds.Tables("Emails").Rows(row)("cc_addresses")
BCC.Text = ds.Tables("Emails").Rows(row)("bcc_addresses")
Subject.Text = ds.Tables("Emails").Rows(row)("subject")
Body.Text = ds.Tables("Emails").Rows(row)("body")
TabPage1.SendToBack()

and also TabPage1.Visible = False but neither worked.

How do I get TabPage2 to display programmatically?

It works fine if I select the tab manually but I want it to automatically
display the tabbed page after the data is put on the page.

Thanks,

Tom
Nov 6 '07 #1
3 1420
I forgot to mention that this is a VS 2003 Windows Forms DataGrid.

Tom
"tshad" <tf*@dslextreme.comwrote in message
news:u%****************@TK2MSFTNGP06.phx.gbl...
>I have a page with 2 Tabbed Pages on them (TabPage1, TabPage2).

I am on TabPage1 and when selecting something on the page I am displaying
information on TabPage2 and then want to go to TabPage2, but it doesn't
work.

I tried:

EmailFrom.Text = ds.Tables("Emails").Rows(row)("from_address")
EmailTo.Text = ds.Tables("Emails").Rows(row)("to_addresses")
CC.Text = ds.Tables("Emails").Rows(row)("cc_addresses")
BCC.Text = ds.Tables("Emails").Rows(row)("bcc_addresses")
Subject.Text = ds.Tables("Emails").Rows(row)("subject")
Body.Text = ds.Tables("Emails").Rows(row)("body")
TabPage1.SendToBack()

and also TabPage1.Visible = False but neither worked.

How do I get TabPage2 to display programmatically?

It works fine if I select the tab manually but I want it to automatically
display the tabbed page after the data is put on the page.

Thanks,

Tom

Nov 6 '07 #2
This is what I found on a website on how to do this:
*****************************************
Getting and Setting Active Tab Programmaticall

You can get and set an active tab of a TabControl programmatically using the
SelectedTab property of TabControl. For example, the following code snippet
sets PreferencePage as active tab:

this.tabControl1.SelectedTab = this.PreferencesPage;
*********************************************

I tried this:

EmailDataGrid.TableStyles.Add(dgStyle)
EmailDataGrid.DataSource = ds.Tables("Emails")
EmailDataGrid.ReadOnly = True
TabControl1.SelectedTab = TabPage1

But it doesn't do anything. I am doing this. After filling the DataGrid, I
am setting the TabContol1 to the TabPage1 page.

Is there something else I need to do to get this to work?

Thanks,

Tom

"tshad" <tf*@dslextreme.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I forgot to mention that this is a VS 2003 Windows Forms DataGrid.

Tom
"tshad" <tf*@dslextreme.comwrote in message
news:u%****************@TK2MSFTNGP06.phx.gbl...
>>I have a page with 2 Tabbed Pages on them (TabPage1, TabPage2).

I am on TabPage1 and when selecting something on the page I am displaying
information on TabPage2 and then want to go to TabPage2, but it doesn't
work.

I tried:

EmailFrom.Text = ds.Tables("Emails").Rows(row)("from_address")
EmailTo.Text = ds.Tables("Emails").Rows(row)("to_addresses")
CC.Text = ds.Tables("Emails").Rows(row)("cc_addresses")
BCC.Text = ds.Tables("Emails").Rows(row)("bcc_addresses")
Subject.Text = ds.Tables("Emails").Rows(row)("subject")
Body.Text = ds.Tables("Emails").Rows(row)("body")
TabPage1.SendToBack()

and also TabPage1.Visible = False but neither worked.

How do I get TabPage2 to display programmatically?

It works fine if I select the tab manually but I want it to automatically
display the tabbed page after the data is put on the page.

Thanks,

Tom


Nov 7 '07 #3
Got it to work.

The problem had to do with it going to the SelectedIndexChanged event of my
ComboBox at the start of the program.

Both TabControl1.SelectedTab and TabControl1.SelectedIndex worked fine.

Tom
"tshad" <tf*@dslextreme.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
This is what I found on a website on how to do this:
*****************************************
Getting and Setting Active Tab Programmaticall

You can get and set an active tab of a TabControl programmatically using
the SelectedTab property of TabControl. For example, the following code
snippet sets PreferencePage as active tab:

this.tabControl1.SelectedTab = this.PreferencesPage;
*********************************************

I tried this:

EmailDataGrid.TableStyles.Add(dgStyle)
EmailDataGrid.DataSource = ds.Tables("Emails")
EmailDataGrid.ReadOnly = True
TabControl1.SelectedTab = TabPage1

But it doesn't do anything. I am doing this. After filling the DataGrid,
I am setting the TabContol1 to the TabPage1 page.

Is there something else I need to do to get this to work?

Thanks,

Tom

"tshad" <tf*@dslextreme.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>I forgot to mention that this is a VS 2003 Windows Forms DataGrid.

Tom
"tshad" <tf*@dslextreme.comwrote in message
news:u%****************@TK2MSFTNGP06.phx.gbl...
>>>I have a page with 2 Tabbed Pages on them (TabPage1, TabPage2).

I am on TabPage1 and when selecting something on the page I am
displaying information on TabPage2 and then want to go to TabPage2, but
it doesn't work.

I tried:

EmailFrom.Text = ds.Tables("Emails").Rows(row)("from_address")
EmailTo.Text = ds.Tables("Emails").Rows(row)("to_addresses")
CC.Text = ds.Tables("Emails").Rows(row)("cc_addresses")
BCC.Text = ds.Tables("Emails").Rows(row)("bcc_addresses")
Subject.Text = ds.Tables("Emails").Rows(row)("subject")
Body.Text = ds.Tables("Emails").Rows(row)("body")
TabPage1.SendToBack()

and also TabPage1.Visible = False but neither worked.

How do I get TabPage2 to display programmatically?

It works fine if I select the tab manually but I want it to
automatically display the tabbed page after the data is put on the page.

Thanks,

Tom



Nov 7 '07 #4

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

Similar topics

8
by: François de Dardel | last post by:
I have a complete Intranet site with about 140 pages using Verdana as the basic font. How do I place a table (12 columns) with Arial instead of Verdana, only for that table. I have defined a style...
7
by: Frostillicus | last post by:
Hi, I've written some javascript to randomly choose a classical music composer's picture and sample audio and display it on my home page (http://marc.fearby.com/), and this works fine in Mozilla...
7
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is...
6
by: Thaynann | last post by:
I have an app that i am developing, it access a website via HttpWebRequest and HttpWebResponse classes (eg http://thaynann.com/images/) and at the moment i am able to save all the image files from...
3
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a...
2
by: Joe | last post by:
Hi, I have a website with a mix of static (.html) and dynamic pages (.aspx) pages. I was wondering to change extension .html to .aspx , only to accommodate future needs of making static pages...
2
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How...
2
by: Fokke Nauta | last post by:
Hi all, I am searching for a script that can change 2 pages in a frame when clicking on 1 link. Example: I have a frameset with 3 pages (content, banner and main). In the content I want to...
6
by: Martin Slater | last post by:
Hi all, I'm using a webbrowser control within an application for the UI and want to hide the flicker and redraw when changing pages. Ideally I want to render the new page to a seperate...
8
by: richard | last post by:
I have <div id=box1 style="display:block"as the initial setting. I need to change the "display:block" to "display:none" then back to "display:block" as a means of clearing anything that might be...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.