Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


GTP.NET FAQ 10099


How do I set the DateScaler properties to display the current date as starting date. Please note that this article refers to the GTP.NET
Jump to article- 2008-01-31 10:11:00 - Email plexityHide

Question

How do I set the DateScaler properties to display the current date as starting date. I tried to set the StartTime and StopTime in the DateScaler properties box but the component is not refreshing, but it sets the StopTime to the date i specified, but the start time is always Aug 5 2003. Also I want the date should display in Hours...

Answer

It has come to our attention that setting the DateScaler.StartTime and DateScaler.StopTime only works if done in such a way that StartTime is always smaller than StopTime... This is considered a bug with low priority (exists in 1.3.1). The workaround is to use the DateScaler.TimeSpanSet(Start,Stop) that will work.

Going like this...

DateTime t = DateTime.Today;
t.AddDays(1);
gantt1.DateScaler.TimeSpanSet(DateTime.Today, t);

...will give you a view of one day. Depending on the width of the Gantt-area the scale will find a value that is the best presentation for one day. To get another resolution you add more days to the view.

 

Another similair question was: I want to center the view around a specific time item:

If you know where you want the middle of the visual span (xmiddle=timeItemStart+(timeItem.Duration()/2)) you can set the Datescaler to show this by calling Gantt.DateScaler.TimeSpanSet(xstart,xstop), 

where xstart=xmiddle-(timeItem.Duration()/2) and

xstop= xmiddle+(timeItem.Duration()/2)

 

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...