Time Series Controls


Edit Properties Dialog

The properties dialog allows a user to graphically edit many of the properties of the time series controls. The default properties dialog is shown below:

Properties dialog

Add a New Tab

At times, it may be necessary to add a new tab to the properties dialog. This section describes the process of adding a tab. Specific elements can then be added to the tab page.

First, we need to include the necessary namespaces for the controls. The code for adding a new tab is:

[Visual Basic]
' Create the properties dialog for an Xbar chart. The trailing zeros specify what tab should be
'   opened initially, what series selected, what limit range range selected, what limit selected,
' and the current zone
Dim tspDialog As New TimeSeriesProperties("Properties", xbarChart, 0, 0, 0, 0, 0) Dim tpNewPage As New TabPage("New Tab")

' Get the tabcontrol of the properties dialog
Dim tcControl As TabControl = tspDialog.Controls("tabBWProps")
tcControl.TabPages.Add(tpNewPage)

' Show the properties dialog
If tspDialog.ShowDialog() = DialogResult.OK Then
    ' Do something
End If

[Visual C#]
// Create the properties dialog for an Xbar chart. The trailing zeros specify what tab should be
//   opened initially, what series selected, what limit range range selected, what limit selected,
//   and the current zone
TimeSeriesProperties tspDialog = new TimeSeriesProperties("Properties", xbarChart, 0, 0, 0, 0, 0);

// Create a new tab to add to the dialog
TabPage tpNewPage = new TabPage("New Tab");

// Get the tabcontrol of the properties dialog
((TabControl)(tspDialog.Controls["tabBWProps"])).TabPages.Add(tpNewPage);

// Show the properties dialog
if(tspDialog.ShowDialog() == DialogResult.OK)
{
    // Do something
}

After the tab has been added, the properties dialog should look similar to the following:

Properties dialog with new tab