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

Programatically Add Tab with Controls

meh
Could someone point to some samples or documentation that would help me
create "on-the-fly" a tab (In an existing TabControl) with a treeview
control on it...

tia
meh
Nov 20 '05 #1
6 2124
http://msdn.microsoft.com/library/en...asp?frame=true

The sample adds a button to the new tab, but you can replace that with a
treeview.

-Rob Teixeira [MVP]

"meh" <re******************@cox.net> wrote in message
news:e1****************@tk2msftngp13.phx.gbl...
Could someone point to some samples or documentation that would help me
create "on-the-fly" a tab (In an existing TabControl) with a treeview
control on it...

tia
meh

Nov 20 '05 #2
* "meh" <re******************@cox.net> scripsit:
Could someone point to some samples or documentation that would help me
create "on-the-fly" a tab (In an existing TabControl) with a treeview
control on it...


Untested:

\\\
Dim tp As New TabPage()
Dim tv As New TreeView()

' Set treeview's properties here.
..
..
..

tp.Controls.Add(tv)
Me.TabControl1.TabPages.Add(tp)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
meh
Thanks a bunch for the quick reply......Actually I was trying to copy the
main tab as a template.......

meh

"Rob Teixeira [MVP]" <RobTeixeira@@msn.com> wrote in message
news:OX****************@TK2MSFTNGP11.phx.gbl...
http://msdn.microsoft.com/library/en...asp?frame=true
The sample adds a button to the new tab, but you can replace that with a
treeview.

-Rob Teixeira [MVP]

"meh" <re******************@cox.net> wrote in message
news:e1****************@tk2msftngp13.phx.gbl...
Could someone point to some samples or documentation that would help me
create "on-the-fly" a tab (In an existing TabControl) with a treeview
control on it...

tia
meh


Nov 20 '05 #4
meh
As usual Herfried your untested code works like a "top"! (or new tab page in
this case)

thx
meh

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uE****************@tk2msftngp13.phx.gbl...
* "meh" <re******************@cox.net> scripsit:
Could someone point to some samples or documentation that would help me
create "on-the-fly" a tab (In an existing TabControl) with a treeview
control on it...


Untested:

\\\
Dim tp As New TabPage()
Dim tv As New TreeView()

' Set treeview's properties here.
.
.
.

tp.Controls.Add(tv)
Me.TabControl1.TabPages.Add(tp)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #5
meh
ya know I thought that if I adding a new Tabpage and then assigned it to an
existing tabpage that I would get a clone of the Tabpage......i.e.
Dim tp As New TabPage()

tp = TabPage1

Me.TabControl.TabPages.Add(tp)

But this is not giving me the results I expected. Is the TabPage not an
object in and of itself????

"meh" <re******************@cox.net> wrote in message
news:e1****************@tk2msftngp13.phx.gbl...
Could someone point to some samples or documentation that would help me
create "on-the-fly" a tab (In an existing TabControl) with a treeview
control on it...

tia
meh

Nov 20 '05 #6
* "meh" <re******************@cox.net> scripsit:
As usual Herfried your untested code works like a "top"! (or new tab page in
this case)


Thank you for confirming that.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7

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

Similar topics

0
by: CoreyMas | last post by:
Hello Everyone, I have been successful in creating a template column programatically using the examples provided in VS 2003. However I have not been able to programatically set the width of a...
2
by: John | last post by:
Hi, heres a brief description of what I'm trying to do. I have a sql table named colors that looks like this: color_id color_name 1 blue 2 red 3......... and so...
4
by: Andrea Williams | last post by:
Does anyone know of some in depth documentation regarding how to add user controls programatically? I have a User Control, which has some basic html controls, and depending on the number selected...
1
by: Carl Mercier | last post by:
Hi, I have a long form that post back to itself at different places (different controls). At the very end, I have a button called "Next" that post back to itself again causing some panels to be...
1
by: francois | last post by:
Hi, I would like to add a USER control (not custom control) programmatically to my aspx page. I am using something like the following in my page_load code : * Bos.UserControls.HeaderFinance...
4
by: stb | last post by:
I have an empty asp:table on a form. Rows and cells in the rows are added programatically. At the end of each row, there is a cell with a button inside it. How do I catch the button's click...
3
by: Mike Fellows | last post by:
ok guys you have been a great help so far with this but im still struggling I have some programatically created checkboxes within a panel how can i set a checkbox to be actually checked (i.e....
0
by: spikedpunchvictim | last post by:
Maybe someone here can help me. I am programatically adding Controls to a Panel whose AutoScroll Property is set to True. When I add more controls than can visually fit on the Panel, they just...
1
by: =?Utf-8?B?Tmlrb2xheSBQb2Rrb2x6aW4=?= | last post by:
Goon afternoon, Community! I'm sorry for a post in wrong place, but couldn't find more appropriate place for that. Could you be so kind and help me with dynamic creating controls in asp.net....
7
by: The Mad Ape | last post by:
Hi I have code to programatically create a label. It works but when I try to call a sub to create a tooltip it does not work. I do not get an error so have no idea what it wrong. Please review...
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
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...
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: 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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.