Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


GTP.NET FAQ 11126


Bigger jumps on datescaler scrolling Please note that this article refers to the GTP.NET
Jump to article- 2008-01-31 10:54:00 - Email plexityHide

Question

I would like to change the user scroll step. I want the user to take bigger steps in time when they press the datescaler scrollbuttons. How can I go about that?

Answer

One way to solve that is to implement the OnBeforeScaleOrSpanChange event and change the deault values.

    private void buttonSetUpBiggerJumpOnTimeScroll_Click(object sender, EventArgs e)
    {
      gantt1.DateScaler.OnBeforeScaleOrSpanChange += new BeforeScaleOrSpanChangeEventHandler(DateScaler_OnBeforeScaleOrSpanChange);
    }

    void DateScaler_OnBeforeScaleOrSpanChange(DateScaler dateScaler, BeforeScaleOrSpanChangeArgs e)
    {
      if (e.DateScalerChangeKind==DateScalerChangeKind.userpan)
      {
        TimeSpan defaultjumpsize=e.NewStartTime-gantt1.DateScaler.StartTime;
        // 4 times bigger jumps than default...
        e.NewStartTime = gantt1.DateScaler.StartTime + defaultjumpsize + defaultjumpsize + defaultjumpsize + defaultjumpsize;
        e.NewStopTime = gantt1.DateScaler.StopTime + defaultjumpsize + defaultjumpsize + defaultjumpsize + defaultjumpsize;
       
      }
    }

 

Google
WWW plexityHide GTP.NET FAQ
Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ general

Testimonials

"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%"
Gaurav Patole,
WebTechDevelopers
More testimonials...