PC Review


Reply
Thread Tools Rate Thread

Creating my own Tabcontrol-like control in VB.Net

 
 
André Nogueira
Guest
Posts: n/a
 
      20th Aug 2004
Hi there.
First of all, sorry for the double post, but I was not sure about which was
the most correct group for this question...
I am trying to create my own control that will be alot like the control
Outlook 2003 has where you can choose "mail", "Calendar", etc.
However, I've got two questions.
1) If you add a tab control, you can choose which tab you want to add
controls to in the development environment. How can I add this functionality
to my own control?
2) Each tab page has its own panel, and you can add controls to it at design
time. How can I archieve this with my own control?

Thank you for your time!

André Nogueira


 
Reply With Quote
 
 
 
 
Arne Janning
Guest
Posts: n/a
 
      20th Aug 2004

"André Nogueira" <(E-Mail Removed)>
> I am trying to create my own control that will be alot like the control
> Outlook 2003 has where you can choose "mail", "Calendar", etc.
> However, I've got two questions.
> 1) If you add a tab control, you can choose which tab you want to add
> controls to in the development environment. How can I add this
> functionality to my own control?
> 2) Each tab page has its own panel, and you can add controls to it at
> design time. How can I archieve this with my own control?


Hi André,

I know that this is not an answer to your question but I have made the
experience that buying such a control is cheaper than doing it oneself from
scratch.

Here are two links to commercial controls:

http://www.devcomponents.com/dotnetbar/
http://www.windowsforms.net/ControlG...328&tabindex=0
http://www.infragistics.com/products/lookandfeel.asp

Cheers

Arne Janning


 
Reply With Quote
 
André Nogueira
Guest
Posts: n/a
 
      20th Aug 2004
Yeah, I know. But I have lots of free time and am doing this just for the
fun of it, until I go to college in October.
I already made, for instance, Office 2003-style menus though there are many
around.
It's just a way of learning new things and experimenting.
If I were doing a commercial program, I'd definately buy the controls as
oposed to writing my bug-filled ones from scratch
Thank you for your suggestion though!

Andre Nogueira

"Arne Janning" <spam.me-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> "André Nogueira" <(E-Mail Removed)>
>> I am trying to create my own control that will be alot like the control
>> Outlook 2003 has where you can choose "mail", "Calendar", etc.
>> However, I've got two questions.
>> 1) If you add a tab control, you can choose which tab you want to add
>> controls to in the development environment. How can I add this
>> functionality to my own control?
>> 2) Each tab page has its own panel, and you can add controls to it at
>> design time. How can I archieve this with my own control?

>
> Hi André,
>
> I know that this is not an answer to your question but I have made the
> experience that buying such a control is cheaper than doing it oneself
> from scratch.
>
> Here are two links to commercial controls:
>
> http://www.devcomponents.com/dotnetbar/
> http://www.windowsforms.net/ControlG...328&tabindex=0
> http://www.infragistics.com/products/lookandfeel.asp
>
> Cheers
>
> Arne Janning
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      20th Aug 2004
* "André Nogueira" <(E-Mail Removed)> scripsit:
> I am trying to create my own control that will be alot like the control
> Outlook 2003 has where you can choose "mail", "Calendar", etc.
> However, I've got two questions.
> 1) If you add a tab control, you can choose which tab you want to add
> controls to in the development environment. How can I add this functionality
> to my own control?
> 2) Each tab page has its own panel, and you can add controls to it at design
> time. How can I archieve this with my own control?


Take a look at the implementation of the explorer bar's design-time
support in the Visual Basic PowerPack:

<URL:http://www.gotdotnet.com/Community/Workspaces/workspace.aspx?id=167542e0-e435-4585-ae4f-c111fe60ed58>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Arne Janning
Guest
Posts: n/a
 
      20th Aug 2004
"André Nogueira" <(E-Mail Removed)> schrieb
Hi Andrč,

If you are not a commercial programmer I totally agree with you: there is no
better way of learning Windows.Forms than developing one's own controls.

Unfortunately, AFAIK there are no free implementations or at least how-to's
that describe how to implement a Outlook 2003-style Tabbar.

So you'll have to do everything on your own... (The learning effect might
even be bigger :-)

Cheers

Arne Janning


 
Reply With Quote
 
André Nogueira
Guest
Posts: n/a
 
      20th Aug 2004
Yeah, I know I have to do it all by myself.
The only questions I have are the ones I posted on my first post.
I found some code about the expanding control panels coded in VB.net that
mimic the controls found in Windows XP's Windows Explorer.
I'll look at them and take it from there.

Cheers

Andre Nogueira

"Arne Janning" <spam.me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "André Nogueira" <(E-Mail Removed)> schrieb
> Hi Andrč,
>
> If you are not a commercial programmer I totally agree with you: there is
> no better way of learning Windows.Forms than developing one's own
> controls.
>
> Unfortunately, AFAIK there are no free implementations or at least
> how-to's that describe how to implement a Outlook 2003-style Tabbar.
>
> So you'll have to do everything on your own... (The learning effect might
> even be bigger :-)
>
> Cheers
>
> Arne Janning
>



 
Reply With Quote
 
Ray Cassick \(Home\)
Guest
Posts: n/a
 
      20th Aug 2004
I have not looked into designing an outlook bar like in V2003, but I suggest
that this article:

http://www.codeproject.com/cs/miscctrl/csoutlookbar.asp

....might lead you to some answers to your basic questions... True it is not
in VB.NET but the basic design principals are the same.



"André Nogueira" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi there.
> First of all, sorry for the double post, but I was not sure about which

was
> the most correct group for this question...
> I am trying to create my own control that will be alot like the control
> Outlook 2003 has where you can choose "mail", "Calendar", etc.
> However, I've got two questions.
> 1) If you add a tab control, you can choose which tab you want to add
> controls to in the development environment. How can I add this

functionality
> to my own control?
> 2) Each tab page has its own panel, and you can add controls to it at

design
> time. How can I archieve this with my own control?
>
> Thank you for your time!
>
> André Nogueira
>
>



 
Reply With Quote
 
New Member
Join Date: Mar 2011
Posts: 1
 
      25th Mar 2011
If you mean how to add controls to a newly opened tab then open a new project and add a tab control and remove all the tabs and add two buttons and change their name in the properties bar to "addtabbutton" and "deletetabbutton" then look at this example code:

Public Class Form1
Dim int As Integer = 0, numFavourites = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
Private Sub AddTabButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddTabButton.Click
Dim Text As New TextBox
TabControl1.TabPages.Add("New Tab")
TabControl1.SelectTab(int)
Text.Name = "Sample by Joshwd36"
Text.Dock = DockStyle.Fill
TabControl1.SelectedTab.Controls.Add(Text)
int = int + 1
End Sub

Private Sub DeleteTabButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteTabButton.Click
If Not TabControl1.TabPages.Count = 1 Then
TabControl1.TabPages.RemoveAt(TabControl1.SelectedIndex)
TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
int = int - 1
End If
End Sub
End Class

This is in vb 2010
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put a control beside a TabControl? Vanessa Microsoft C# .NET 4 31st May 2008 04:22 PM
Getting the reference to the control add to a TabControl sravan_reddy001 Microsoft VB .NET 2 24th Jun 2007 06:22 PM
Creating TabPage and dynamicaly adding to TabControl RA Microsoft C# .NET 1 4th Mar 2005 07:21 PM
Creating Runtime Controls in a TabControl =?Utf-8?B?RHlsYW4=?= Microsoft Dot NET 2 16th Apr 2004 10:25 AM
Bound control on tabcontrol has no value Maurice Mertens Microsoft Dot NET 0 13th Apr 2004 10:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:21 AM.