ComponentOne GanttView for WinForms
Removing Top Level From the Time Scale
GanttView for WinForms Task-Based Help > Removing Top Level From the Time Scale

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