XY Chart NET 3 Control Reference
CustomToolbar Property

XYChartNET provides a Custom Toolbar Collection.  Use this property to: 

CustomToolbar uses the CustomToolbar Class set of properties and methods to manipulate the collection.

Syntax
[Visual Basic]
Property CustomToolbar() As C_CustomToolbar
[C#]
XYChartNet.XYChartNETCtl.C_CustomToolbar XYChartNETCtl.CustomToolbar
[C++]
property XYChartNet::XYChartNETCtl::C_CustomToolbar ^ XYChartNet::XYChartNETCtl::CustomToolbar
       
Example
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        With XyChartNETCtl1
            Dim objNewButton As XYChartNet.XYChartNETCtl.C_tbButton
            Dim objCheckButton As XYChartNet.XYChartNETCtl.C_tbCheckButton
            Dim objSeparator As XYChartNet.XYChartNETCtl.C_tbSeparator
            Dim objOpenButton As XYChartNet.XYChartNETCtl.C_tbButton

            'Set Custom Toolbar below the main Toolbar at the Top
            .Toolbar.Dock = XYChartNet.XYChartNETCtl.PositionOptions.poTop
            .CustomToolbar.Dock = XYChartNet.XYChartNETCtl.CustomToolbarPositionOptions.cpTop

            'Create Custom Toolbar items: Button,
            '                             Checked Button,
            '                             Separator, and
            '                             Button
            'and set its properties
            objNewButton = .CustomToolbar.Add(XYChartNet.XYChartNETCtl.ToolbarItemTypes.tbButton)
            With objNewButton
                .Name = "NewButton"
                .Enabled = True
                .ToolTipText = "New"
                Try
                   .Image = Image.FromFile("c:\\NewButtonImage.png")
                Catch ex As Exception
                   MsgBox("Invalid image file")
                End Try
            End With
            '
            objCheckButton = .CustomToolbar.Add(XYChartNet.XYChartNETCtl.ToolbarItemTypes.tbCheckButton)
            With objCheckButton
                .Name = "NewStateButton"
                .Enabled = True
                .ToolTipText = "New State"
                Try
                   .CheckedImage = Image.FromFile("c:\\NewCheckedImage.png")
                Catch ex As Exception
                   MsgBox("Invalid checked image file")
                End Try
                Try
                   .UncheckedImage = Image.FromFile("c:\\NewUncheckedImage.png")
                Catch ex As Exception
                   MsgBox("Invalid unchecked image file")
                End Try
            End With
            '
            objSeparator = .CustomToolbar.Add(XYChartNet.XYChartNETCtl.ToolbarItemTypes.tbSeparator)
            objSeparator.Name = "Separator1"
            '
            objOpenButton = .CustomToolbar.Add(XYChartNet.XYChartNETCtl.ToolbarItemTypes.tbButton)
            With objOpenButton
                .Name = "OpenButton"
                .Enabled = True
                .ToolTipText = "Open"
                Try
                   .Image = Image.FromFile("c:\\OpenButtonImage.png")
                Catch ex As Exception
                   MsgBox("Invalid open image file")
                End Try
            End With

            .Refresh()
        End With
    End Sub
                       
                       
See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.