Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ScrollBar Question (Read 1432 times)
Glacier
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Mar 10th, 2008
ScrollBar Question
Mar 10th, 2008 at 3:46pm
Print Post  
HI,

I'm trying to add dates to the control when the scroll bar has reached its limit. In ResourceView when the HScroll bar has hit its limit i'd like to add
one day to the control. So far there is the code i'm using:

Code
Select All
if(ScheduleC.GetLastVisibleDate()>=ScheduleC.EndDate)
{
    ScheduleC.Date=ScheduleC.Date.AddDays(1);
    ScheduleC.EndDate=ScheduleC.EndDate.AddDays(1);
}
e.NewValue=ScheduleC.HScrollPos;
 



I'm trying to keep a range of 7 days in the Resource View only. The code is located in the HScroll event. The issue arrises when I hold down the ScrollButton on the right side. Then the ScrollBar position appears back at the end of the scroll bar and starts to constantly advance dates. Is there a way to change this behavior?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: ScrollBar Question
Reply #1 - Mar 10th, 2008 at 4:01pm
Print Post  
Have a look at the UnlimitedScrolling sample installed with Planner.NET. It demonstrates how to achieve the very same effect under WeekRange view. You have to modify the following things in order to make it work under Resource view:

1) Change the view to Resource.
2) Handle the HScroll event instead of the VScroll.
3) Compare to the HScrollPos instead of the VScrollPos in the event handlers.
4) Advance by 1 day, instead of 7.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint