ComponentOne GanttView for WinForms
Setting a Tier for the TimeScale
GanttView for WinForms Task-Based Help > Setting a Tier for the TimeScale

This topic shows you how to programmatically set the tier, specify the units, and format the timescale when you click on the TimeScale button.

To write code in Visual Basic

Visual Basic
Copy Code
Private Sub btnTimescale_Click(sender As Object, e As EventArgs)
    Dim st As ScaleTier = ganttView.Timescale.TopTier
    st.Units = TimescaleUnits.ThirdsOfMonths
    st.Format = "sd"
    st.Visible = True
End Sub

To write code in C#

C#
Copy Code
private void btnTimescale_Click(object sender, EventArgs e)
{
    ScaleTier st = ganttView.Timescale.TopTier;
    st.Units = TimescaleUnits.ThirdsOfMonths;
    st.Format = "sd";
    st.Visible = true;
}
See Also