10029 : disable clicking and dragging on the heading to adjust the zoom level of the Gantt chart?

Question

Can you disable clicking and dragging on the heading to adjust the zoom level of the Gantt chart?

We would need more control over the zoom level in the Gantt chart.

Answer

The event DateScaler.OnBeforeScaleOrSpanChange has been added for this purpose. The event Fires whenever the scale or shown intervall is changed by user interaction.

Example to stop panoration and zooming could look like this:

    private void dateScaler1_OnBeforeScaleOrSpanChange(PlexityHide.GTP.DateScaler dateScaler, PlexityHide.GTP.BeforeScaleOrSpanChangeArgs e)< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

    {

      if (e.IsZoom && cbStopZooming.Checked)

      {

        e.NewStartTime=dateScaler1.StartTime; // Set new values back to current

        e.NewStopTime=dateScaler1.StopTime;

      }

 

      if (!e.IsZoom && cbStopPan.Checked)

      {

        e.NewStartTime=dateScaler1.StartTime; // Set new values back to current

        e.NewStopTime=dateScaler1.StopTime;

      }       

    }

 

Note: At publication date a patch download must be downloaded to access this new event. 

 

 

Leave a Reply