Showing posts with label Janus ExplorerBar. Show all posts
Showing posts with label Janus ExplorerBar. Show all posts
  • Using a layout file to preserve user changes [Janus GridEX WinForms Control v3.5 for .NET] This tutorial is intended to show you how to save and load a layout file to preserve ExplorerBar
    control settings.

    Using a layout file you could be able to preserve even the changes to the layout
    made by the user.


    The steps followed to create this project were:


    1) Create a new Visual Basic or C# project using "Windows Application" Template.

    2) Add a ExplorerBar control to Form1.

    3) Add a button and change its Text property to "Load".

    4) In the Click event of the load button, load the layout from a file calling a procedure similar to
    the following:



    In VB:


    Private Sub LoadLayout()
    Dim LayoutDir As String = GetLayoutDirectory() + "\ExplorerBarLayout.ebl"
    Dim LayoutStream As FileStream
    LayoutStream = New FileStream(LayoutDir, FileMode.Open)
    ExplorerBar1.LoadLayoutFile(LayoutStream)
    LayoutStream.Close()
    End Sub


    In C#:


    private void LoadLayout()
    {
    string layoutDir = GetLayoutDirectory() + @"\ExplorerBarLayout.ebl";
    FileStream layoutStream;
    layoutStream = new FileStream(layoutDir, FileMode.Open);
    explorerBar1.LoadLayoutFile(layoutStream);
    layoutStream.Close();
    }


    5) Add a button and change its Text property to "Save".

    6) In the Click event of the save button, save the layout from to file calling a procedure similar to
    the following:


    In VB:


    Private Sub SaveLayout()
    Dim LayoutDir As String = GetLayoutDirectory() + "\ExplorerBarLayout.ebl"
    Dim LayoutStream As FileStream
    LayoutStream = New FileStream(LayoutDir, FileMode.Create)
    ExplorernBar1.SaveLayoutFile(LayoutStream)
    LayoutStream.Close()
    End Sub


    In C#:


    private void SaveLayout()
    {
    string layoutDir = GetLayoutDirectory() + @"\ExplorerBarLayout.bbl";
    FileStream layoutStream;
    layoutStream = new FileStream(layoutDir, FileMode.Create);
    explorerBar1.SaveLayoutFile(layoutStream);
    layoutStream.Close();
    }


    Note: You can also save the current layout by calling the Update method of the Layout.


    In VB:


    If Not ExplorerBar1.CurrentLayout Is Nothing Then
    ExplorerBar1.CurrentLayout.Update()
    End If


    In C#:


    if(explorerBar1.CurrentLayout!=null)
    {
    explorerBar1.CurrentLayout.Update();
    }



    7) Run the project.

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

    more
  • Using a ExplorerBarGroup as a Container Control [Janus GridEX WinForms Control v3.5 for .NET] This tutorial is intended to show you how to set an ExplorerBarGroup as a container control.

    The steps followed to create this project are:

    1) Create a new Visual Basic or C# project using "Windows Application" Template.

    2) Drag an ExplorerBar control from the toolbox into the Form designer.

    3) Right click in the ExplorerBar control and select "ExplorerBar Designer" menu. In the
    ExplorerBar dialog add a new group and set its Container property to true in the property
    window.

    4) In the Load event of the form add the TreeView control as follows:


    In C#


    private void Form1_Load(object sender, System.EventArgs e)
    {
    this.explorerBar1.Groups[0].ContainerControl.Controls.Add(this.treeView1);
    this.treeView1.Dock = DockStyle.Fill;
    }


    In VB


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
    MyBase.Load
    Me.ExplorerBar1.Groups(0).ContainerControl.Controls.Add(Me.TreeView1)
    Me.TreeView1.Dock = DockStyle.Fill
    End Sub


    Note: At design time you can just drag the TreeView control into the ExplorerBarGroup directly


    5) Run the project.

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

    more
  • Show ExplorerBar Groups in several columns [Janus GridEX WinForms Control v3.5 for .NET] This tutorial is intended to show you how to set ExplorerBar groups in several columns.


    The steps followed to create this project are:


    1) Create a new Visual Basic or C# project using "Windows Application" Template.



    2) Drag an ExplorerBar control from the toolbox into the Form designer.

    3) Select the ExplorerBar control and change the Columns property to 3 in the property
    window.

    4) Right click in the ExplorerBar control and select "ExplorerBar Designer" menu. Add new
    groups and items to the ExplorerBar control in the Designer.

    Note: You can specify the column span of each group with the ColumnSpan property of the
    ExplorerBarGroup.


    5) Run the project.

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

    more