Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Stop "auto scroll" feature in Resource View (Read 3371 times)
DamianC
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 16
Joined: Aug 19th, 2015
Stop "auto scroll" feature in Resource View
Sep 9th, 2015 at 6:00am
Print Post  
Hi,

I have a small usage problem with a Resource View.

Background
- By design our appointments have same Style and SelectedStyle - so "selected" is not obvious visually.

Procedure
1. user clicks on the Appointment (they are looking for more info)
2. the ItemMouseEvent is caught - and a modal dialog is launched with the relevant extra info for the user
3. the user dismisses the dialog.
Note: at this stage the Appointment is "selected" (although not visual).
4. the user moves their mouse off the AwtCalendar.

The problem is that (assuming the AwtCalendar has scroll bars because it is too large for the view port) the AwtCalendar starts auto scrolling toward the mouse.

Is there some way to inhibit this auto scrolling?
Perhaps ...
- programatically "unselect"?
- consume the event?
- other?

If I click in the AwtCalendar somewhere (but not on any Appointment) then this behavior stops. I guess that this "deselects" the Appointment and the behavior stops.

Any suggestions would be much appreciated.

Many thanks,
-Damian
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Stop "auto scroll" feature in Resource View
Reply #1 - Sep 9th, 2015 at 12:00pm
Print Post  
The problem is that when an item is clicked, the calendar initiates a dragging operation with this item until the mouse is released. If you display a modal dialog after the item is clicked, but before the mouse is released (for example in itemClick), the release event is lost and the calendar continues the dragging operation until another release event occurs. To prevent this, call the Calendar.resetDrag() method before displaying the modal dialog:

Code
Select All
...
public void itemClick(ItemMouseEvent e)
{
    super.itemClick(e);
    calendar.resetDrag();
    // <--- Display info dialog here
} 


In addition, if you haven't done so already, check your personal messages for a fix of the exception discussed here: http://mindfusion.eu/Forum/YaBB.pl?num=1441699543.

Regards,
Meppy
  
Back to top
 
IP Logged
 
DamianC
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 16
Joined: Aug 19th, 2015
Re: Stop "auto scroll" feature in Resource View
Reply #2 - Sep 10th, 2015 at 6:12am
Print Post  
Hi Meppy,

This has fixed our issue perfectly.

Again, thanks you.
-Damian
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint