473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 1720
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(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, 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.comwrote in message news:w%*********************@fe3.news.blueyonder.c o.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**************@TK2MSFTNGP04.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(ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, 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.comwrote in message
news:w%*********************@fe3.news.blueyonder.c o.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
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...
1
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...
44
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...
1
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...
2
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...
4
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...
1
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...
5
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.