|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RedCell.Windows.Forms.Metro
{
/// <summary>
/// Tab Container
/// </summary>
public partial class TabControl : UserControl
{
private List<Tab> _tabs;
/// <summary>
/// Initializes a new instance of the <see cref="TabControl" /> class.
/// </summary>
public TabControl()
{
_tabs = new List<Tab>();
InitializeComponent();
}
/// <summary>
/// Adds the specified tab.
/// </summary>
/// <param name="tab">The tab.</param>
public void Add(Tab tab)
{
_tabs.Add(tab);
TabButtonPanel.Controls.Add(tab.Button);
tab.Button.BringToFront();
tab.Panel.Dock = DockStyle.Fill;
}
/// <summary>
/// Selects the specified tab.
/// </summary>
/// <param name="tab">The tab.</param>
public void Select(Tab tab)
{
TabPanelContainer.Controls.Clear();
TabPanelContainer.Controls.Add(tab.Panel);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Yvan Rodrigues has 30 years of experience in information systems and software development for the industry. He is Senior Concept Designer at
Robotic Assistance Devices
He is a Certified Technician (C.Tech.), a professional designation granted by the Institute of Engineering Technology of Ontario (IETO).
Yvan draws on experience as owner of
Red Cell Innovation Inc.,
Mabel's Labels Inc. as Manager of Systems and Development, the
University of Waterloo as Information Systems Manager, and
OTTO Motors as Senior Systems Engineer and Senior Concept Designer.
Yvan is currently focused on design of embedded systems.