Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) 5.3.3 (Release) - TreeViewNode scrolling (Read 9603 times)
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
5.3.3 (Release) - TreeViewNode scrolling
Dec 2nd, 2009 at 12:49am
Print Post  
In the DiagramView, when scrolling a TreeViewNode by clicking and dragging the scrollbar , the contents of the node do not change until I have stopped for a moment.

BUT, the contents in the Overview window do change in real time as the scrolling occurs.

This is happening on a Windows 7 Ultimate x64 workstation.

It works as expected exporting the diagram and loading into identical app on a Windows 2003 x86 server instance.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #1 - Dec 2nd, 2009 at 8:33am
Print Post  
We could not reproduce this. Is at least the treeview's scrollbar repainted in the DiagramView while dragging? If it isn't repainted, then probably the WM_PAINT Windows message cannot reach the DiagramView, eg. if the processor is loaded and the mouse-move event handlers take a lot of time.
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #2 - Dec 2nd, 2009 at 7:17pm
Print Post  
Nothing in the TreeViewNode (including the scrollbar) repaints until either I have stopped for anything longer than a fraction of a second or change scroll direction.

But you can see the scrolling in the Overview window as expected.

It's a quad core i7 920 CPU (one of the gruntiest cpus around), nothing else happening on the system. 

It doesn't seem to happen on the addition of the first node, but will start after the second or third.

Will keep on playing and get back to you.
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #3 - Dec 2nd, 2009 at 9:32pm
Print Post  
Executing same assembly on Windows 2003 Server x64 and x86 and Server 2008 x86 - works as expected (but I am remote desktoping into these systems - might make a difference to mouse processing).

I have created a simple program to load in the persisted diagram as xml and it doesn't exhibit the same problem on Win 7.

The DiagramView is embedded into a UserControl which is dynamically created and placed onto a 3rd party tab control.

What do you suggest for debugging this in the actual app, I will try to replicate the problem in the stripped down program as well.

  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #4 - Dec 2nd, 2009 at 9:47pm
Print Post  
Narrowed it down to only happening when I have an Overview window visible.

Extended the simple app to have an Overview control side by side with the DiagramView, and added a button to toggle the Visible of the Overview.

If Overview is not visible, scrolling works as expected.

I have emailed the VS2008 project and a sample XML file.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #5 - Dec 4th, 2009 at 3:13pm
Print Post  
If you move the Overview to a different window, that seems to work fine. Our guess is that Windows 7 somehow changes the priority with which WM_PAINT messages are delivered across the window hierarchy, and in your sample project the DiagramView gets the WM_MOUSEMOVEs while the Overview get the WM_PAINTS. We could change this to immediately redraw the view rather than invalidating it, but that won't happen soon, so you will have to move the overview out of that form. Placing it inside some kind of panel might do the trick too.

Stoyan
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #6 - Dec 4th, 2009 at 7:54pm
Print Post  
Unfortunately the proper app already does have the Overview in a floating panel/window by default using a VS2008 style docking framework from DevExpress.


Can you please send me an updated sample project with your recommended implementation.
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #7 - Dec 6th, 2009 at 8:17pm
Print Post  
Updated sample app two different ways:

1. Moved Overview to a separate Form and displayed via Show(this) from event handler on main form so it stays above parent - same problem

2. As above, but Show() so it doesn't have main form as parent - problem is reversed!  Scrolling works as expected in DiagramView but Overview doesn't update until I stop scrolling.

It's a big problem if we can't find a workaround.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #8 - Dec 7th, 2009 at 9:14am
Print Post  
We've found that when the Overview and DiagramView are in the same window, as in your sample, you can call diagramView.BringToFront() to make the view repaint immediately while scrolling tree nodes. The Overview still lags behind for a part of a second, but that's the normal behavior you get under XP anyway.

If you want the overview to repaint immediately too, you might do that by deriving from Overview, handling the diagram.Repaint event, and calling the base.OnPaint from the handler. Otherwise the default Repaint handler simply invalidates the overview and it is refreshed later when the system sends WM_PAINT and calls OnPaint.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #9 - Dec 7th, 2009 at 10:33pm
Print Post  
Sorry, don't follow, could you please modify the sample app I emailed you and fire it back.

For option #1 do you mean call BringToFront on Form.Load,or perioidcally during some event? Doesn't make a difference if I do it during Form.Load

I've tried the sample app on XP as well and does same thing - Overview isn't updated until I stop scrolling.

Obviously all my development has been in remote desktop because the Overview updates in real time when I scroll during a RDP session and perhaps that works differently?

So what is the functionality by design?

Cheers

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #10 - Dec 8th, 2009 at 8:25am
Print Post  
I didn't meant these options, but the case when both DiagramView and Overview are in the same form. We've only added BringToFront to the form constructor, without changing anything else:

Code
Select All
public Form1()
{
	InitializeComponent();
	Diagram.RegisterItemClass(typeof(TableNode), "custom:TableNode", 1);
	diagramView1.BringToFront();
}
 



The result is that the DiagramView is repainted immediately, and the Overview lags, as in your point 2. This is the behavior by design we've had for years. We don't plan changing that to make the overview repaint immediately - it would just slow down all user interaction without adding anything beneficial.

Regarding repainting the DiagramView - we'll fix that for the next release. The active view is usually repainted immediately during item modification, but we've overlooked the case when scrolling treeviews - the control just calls Invalidate in this case and repaints after the system decides to call OnPaint. Apparently it takes hundreds of items, an Overview and Windows 7 to notice this problem.

Stoyan
  
Back to top
 
IP Logged
 
TimNZ
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 60
Joined: Feb 23rd, 2009
Re: 5.3.3 (Release) - TreeViewNode scrolling
Reply #11 - Dec 8th, 2009 at 9:13pm
Print Post  
Thanks,

It appears that I expected the Overview windows to update in realtime as that was what I was seeing in my remote desktop sessions. 

Even Visio doesn't update its overview window in realtime so I guess it's not an issue for people.

Tim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint