ComponentOne GanttView for WinForms
In This Topic
    Removing Top Level From the Time Scale
    In This Topic

    To programatically remove the top level from the time scale, complete the following:

    1. Add a button control to your form above the C1GanttView control.
    2. Name your button control to btnRemoveTopLevel and add the following event hander to your button control:
    Visual Basic
    Copy Code
    Private Sub btnRemoveTopLevel_Click(sender As Object, e As EventArgs)
            gv.Timescale.TopTier.Visible = False
            btnAddTopLevel.Enabled = True
            btnRemoveTopLevel.Enabled = False
    End Sub
    

    C#
    Copy Code
    private void btnRemoveTopLevel_Click(object sender, EventArgs e)
      {
           gv.Timescale.TopTier.Visible = false;
           btnAddTopLevel.Enabled = true;
           btnRemoveTopLevel.Enabled = false;
      }
    
    1. Run your project and click on the Remove Top Level from Timescale button.

     

    1. The Timescale Tier is removed from the top of the tier.

     

    For more information on this task, see the sample HowToDoItInCode.

    See Also