473,748 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scrolling!

Hi All,
I am using the flow control (can't remember its full name), to display a
few dynamically created controls based on the tags the user has added to my
system. This works fine, except when a user scrolls this control area (when
there are a lot of controls) the screen update is terrible whilst the user
is actually scrolling. The result looks fine when they stop scrolling
though.

The nature of the problem is that it appears to me that when a user scrolls
only one line of pixels is being continuously written per newly shown line,
resulting in a kind of vertical blinds effect until the scrolling stops. Is
there a way to prevent this? Or will I have to override the scroll event and
provide my own functionality?

Thanks
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'
Oct 19 '06 #1
2 1737
Hi Rob,

I don't think there is much you can do except to try double-buffering the Form or container control:

// .NET 2.0
SetStyle(Contro lStyles.Optimiz edDoubleBuffer | ControlStyles.A llPaintingInWmP aint | ControlStyles.U serPaint, true)

(Note: SetStyle is a protected method on Control, which Form inherits)

Or, you can perform the rendering yourself and not use Controls. Many Controls being rendered simultaneously, especially during a
scroll operation, can be an expensive process. By reducing the number of Controls you're almost always going to increase
performance, and hopefully acheive smoother scrolling.

--
Dave Sexton

BTW, I like the quote.

"Rob Pollard" <ro************ @hotmail.comwro te in message news:w%******** *************@f e3.news.blueyon der.co.uk...
Hi All,
I am using the flow control (can't remember its full name), to display a few dynamically created controls based on the tags the
user has added to my system. This works fine, except when a user scrolls this control area (when there are a lot of controls) the
screen update is terrible whilst the user is actually scrolling. The result looks fine when they stop scrolling though.

The nature of the problem is that it appears to me that when a user scrolls only one line of pixels is being continuously written
per newly shown line, resulting in a kind of vertical blinds effect until the scrolling stops. Is there a way to prevent this? Or
will I have to override the scroll event and provide my own functionality?

Thanks
RobP
'There are only 10 types of people in this world - Those that understand binary and those that don't'

Oct 19 '06 #2
Thanks Dave,
I will try using the SetStyle method and see how I get on. The quote is
one I came across a while ago and tickled me when I first saw it!

--
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:es******** ******@TK2MSFTN GP04.phx.gbl...
Hi Rob,

I don't think there is much you can do except to try double-buffering the
Form or container control:

// .NET 2.0
SetStyle(Contro lStyles.Optimiz edDoubleBuffer |
ControlStyles.A llPaintingInWmP aint | ControlStyles.U serPaint, true)

(Note: SetStyle is a protected method on Control, which Form inherits)

Or, you can perform the rendering yourself and not use Controls. Many
Controls being rendered simultaneously, especially during a scroll
operation, can be an expensive process. By reducing the number of
Controls you're almost always going to increase performance, and hopefully
acheive smoother scrolling.

--
Dave Sexton

BTW, I like the quote.

"Rob Pollard" <ro************ @hotmail.comwro te in message
news:w%******** *************@f e3.news.blueyon der.co.uk...
>Hi All,
I am using the flow control (can't remember its full name), to display a
few dynamically created controls based on the tags the user has added to
my system. This works fine, except when a user scrolls this control area
(when there are a lot of controls) the screen update is terrible whilst
the user is actually scrolling. The result looks fine when they stop
scrolling though.

The nature of the problem is that it appears to me that when a user
scrolls only one line of pixels is being continuously written per newly
shown line, resulting in a kind of vertical blinds effect until the
scrolling stops. Is there a way to prevent this? Or will I have to
override the scroll event and provide my own functionality?

Thanks
RobP
'There are only 10 types of people in this world - Those that understand
binary and those that don't'


Oct 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
16692
by: Midas NDT Sales | last post by:
I have been looking at a simple example of a scrolling text box (the one in the SAM book) as below: <script language="JavaScript"> var pos=100; function Scroll() { if (!document.getElementById) return; obj=document.getElementById("thetext"); pos -=1; if (pos < 0-obj.offsetHeight+130) return;
1
7024
by: Kirk | last post by:
Is it possible to stop horizontal scrolling whilst still maintaining vertical scrolling within an <IFRAME> ? Within each page of my site I have an IFRAME for content. For some pages there is very little information to display, thus the frame has no scrolling bars, but on those where there is lots then the vertical scrolling bar appears. However, on two of my pages the horizontal scrolling bar has appeared also - why!? I'm just...
44
919
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to put either tag inside an HTML <TD> and have the same kind of scrolling effect. This would allow me to fill the screen and have the size of the scrolling box change on resize. Thanks in advance.
1
2174
by: Tim Frawley | last post by:
I have a large form with many controls, almost like legal size paper in height. Just so I can head these off, I am not looking for suggestions to the effect of using Tab controls, multi-window or multi-page forms. The Forms AutoScroll property is set to true so the user can scroll the window. What I would like to do is scroll the form for the user. I have explored the possibility of Me.ScrollControlIntoView(control further
2
2975
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a url page
4
7803
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can find the text and select it using the function below, BUT I can't figure out how to have the textarea automatically scroll to the selection in Firefox. Any ideas or suggestions? function search(needle,haystack,start) { var element =...
1
1848
by: atif | last post by:
Hi, I m new to CSharp.. so may be my preliminary questions look stupid.. but plz help me.. I want to drag controls like buttons or some other user controls over form.. i have set form's autoscroll = true to handle scrolling automatically. but when i drag the components of form, scrolling occurs extra ordinary too fast.. so plz help me to control scrolling as in visual studion designer.. as we
5
4267
by: PythonistL | last post by:
I am a newbie with Javascript. I have this simple script for scrolling text <HTML> <HEAD> <TITLE>Scrolling Message Script</TITLE> <SCRIPT language="JavaScript"><!-- var msg = 'My scrolling text.. ' function scrollMsg(){
3
11754
by: Chamnap | last post by:
Hello everybody, I have one problem. I want to do something after the user finished scrolling. The scroll event fires whenever the user is scrolling. I don't want this actually. Does anyone has any idea or trick of how to achieve this? Appreciate your ideas..... Thanks Chamnap
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.