Forum  General Visual ...  How do I...?  Scroll event please !!!
Previous Previous
 
Next Next
New Post 12/16/2010 12:33 PM
  Torque
6 posts
No Ranking


Scroll event please !!! 

This issue has been raised before with a partial answer http://www.visualwebgui.com/Developers/Forums/tabid/364/forumid/29/threadid/43364/scope/posts/threadpage/2/Default.aspx

I'm looking for a way that a UserControl or Panel can raise a Scroll event. Basically I have a UserControl where AutoScroll is set to true. I have created two properties ScrollX and ScrollY that get and set the base properties of ScrollLeft and ScrollTop. When the UserControl has scrollbars and I scroll the control, I would like two other controls to scroll in unison.

I have currently achieved this by using a timer that fires once per second. In the timer event I check if ScrollX and ScrollY have changed since the last time. If they have changed then I use these properties to scroll the other two controls. This is passable and slightly ingenious! but not ideal.

If the UserControl had a Scroll event like in WinForms, then I could scroll the other two controls immediately without the timer. I have read that you have not implemented this event due to performance issues, but please please is there a way to expose it on my choosing. I am prepared to get dirty if necessary! Alternatively have you any other ideas how I may achieve this?

 
New Post 12/18/2010 7:19 AM
  palli
14298 posts
1st Level Poster




Re: Scroll event please !!! 

Hi Torque,

You have read correctly that the Scroll event is not implemented by design, and you have problably read most of the literature, along with the wiki article on differences between Windows Forms and Visual WebGui, so I'm not duplicating any of that here.

It may sound like an easy task just to expose and/or implement the Scroll event firing, but it is really not as simple as it may sound, as the infrastructure needed to support the firing of that event is not available or ready within the framework, so there a a very much more to it than just exposing one event. This would require a huge effort and overhaul of all controls of the framework and has been discussed multiple times before with the same conclution that currently we do not support it.

To explain, so you better understand what we would be up against, then there are two parts in implementing this. First is what you have already done, overriding those properties so that you can change them from the server side code, and then on the next control rendering, those scroll properties would be in effect and your control is correctly rendered accordingly.

The second part is maing all changes to the client side scroll positions known to the server side code, and that's where theimplementation is missing... the framework lacks support for firing those events to the serverside code.

Hope this explains,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/20/2010 12:38 AM
  Torque
6 posts
No Ranking


Re: Scroll event please !!! 

Thanks Palli for the quick response and the explanation. The implementation of the Visual Webgui framework is so excellent that it's easy to forget that it isn't 100% WinForms, and that there are some client/server issues to work around. I love the product though and have already saved the purchase price many times over in reduced development time.

I'm reasonably happy with my timer implementation, so I'll stick with that for now.

 
New Post 12/21/2010 2:03 PM
  palli
14298 posts
1st Level Poster




Re: Scroll event please !!! 

Hi Torque,

You are welcome.

I think I can honestly say I agree with you on all points you made there

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Scroll event please !!!
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS