• Creating a UIPanelGroup [Janus UI and Ribbon Controls v3.5 for .NET]

    The following code shows how to create a UIPanelGroup containing two panels in code and placed on the Form.





    In C#



    Janus.Windows.UI.Dock.UIPanelManager panelManager = new UIPanelManager();

    //Assign the form as the control in which the panels will be placed

    panelManager.ContainerControl = this;



    Janus.Windows.UI.Dock.UIPanelGroup group = new UIPanelGroup();

    //Specify the group style.

    group.GroupStyle = Janus.Windows.UI.Dock.PanelGroupStyle.Tab;



    //Create the two panels that will be added to the group.

    Janus.Windows.UI.Dock.UIPanel panel1 = new Janus.Windows.UI.Dock.UIPanel("Panel 1");

    Janus.Windows.UI.Dock.UIPanel panel2 = new Janus.Windows.UI.Dock.UIPanel("Panel 2");



    //Add the panels to the group created.

    group.Panels.Add(panel1);

    group.Panels.Add(panel2);



    //Add the group to the Panels collection the UIPanelManager

    panelManager.Panels.Add(group);



    //NOTE: A UIPanelGroup must have at least two panels assigned to it or it will be

    //removed from the Controls collection of the container control if its StaticGroup

    //property is False.





    In VB:



    Dim PanelManager As New Janus.Windows.UI.Dock.UIPanelManager()

    'Assign the form as the control in which the panels will be placed

    PanelManager.ContainerControl = Me



    Dim group As New Janus.Windows.UI.Dock.UIPanelGroup()

    'Specify the group style

    group.GroupStyle = Janus.Windows.UI.Dock.PanelGroupStyle.Tab



    'Create the two panels that will be added to the group.

    Dim panel1 As New Janus.Windows.UI.Dock.UIPanel("Panel 1")

    Dim panel2 As New Janus.Windows.UI.Dock.UIPanel("Panel 2")



    'Add the panels to the group created.

    group.Panels.Add(panel1)

    group.Panels.Add(panel2)



    'Add the group to the Panels collection the UIPanelManager

    PanelManager.Panels.Add(group)



    'NOTE: A UIPanelGroup must have at least two panels assigned to it or it will be

    'removed from the Controls 'collection of the container control if its StaticGroup

    'Property is False.

    Source Of Information : Janus v3.5 Help Files for VS 2008


0 comments:

Leave a Reply