473,473 Members | 2,292 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Keeping up with a scrollable panel

Hi all,

In my project I have a control (described in an earlier post) which
basically consists of three "subcontrols": One big area where the vital
data is displayed (scrollable, since it will usually be larger than the
window containing the parent control), a time strip on top of it, and a
resource list on the left. Long story short - when someone scrolls the
scrollable data control, the time strip and resource lists are hooked to
keep up and update themselves.

I used to have the time strip and resource list as scrollable controls
as well, and then just scroll their position along when the main data
control was scrolled. The downside to this - while resizing, the
scrollbars would flash on and off constantly, even if I did a
SuspendLayout() / ResumeLayout() around the resize process.

So I decided to try out another way; The time strip is very simple
(basically just a few lines on the hour, half hour and 15/45 minute
marks, plus a text indicating the time on the hour marks) so I thought
it should be able to keep up - when the main control is scrolled, the
time strip is told what time it is scrolled to, then the control
repaints itself. This works;

However, if I scroll horizontally faster than.. well, painfully slow,
the time strip takes a break, and does not update until I slow down or
stop. The repainting of the main data control is a LOT more complex than
the time strip, so I would actually not think that there would be a
problem keeping up. However, as it is now, the approach with scrolling
another scrollable control in sync with the main one was a lot smoother.

I set all controls to be DoubleBuffer|UserPaint|AllPaintingInWmPaint, btw.

What can I do to ensure that the time strip keeps up? Should I somehow
detect that a new scroll position has been sent inside my paint routine,
so that it aborts the current paint and starts a new one?

Any insights on this would be highly appreciated!

Thanks!

Rune
Apr 4 '07 #1
0 1427

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

Similar topics

4
by: flamesrock | last post by:
First, I'm very new to gui programming, so please go lightly on me :) Ok, so far I've settled on wxPython, and what I'd like to do as a first leap is *convert* a text program into a gui program....
0
by: Suresh Kojhani | last post by:
Hi Dear any one know how can we create scrollable panel in asp.net..if any one know then tell me how can i create than one. Suresh Kumar Software Developer Infinilogic (Pvt.) LTD Karachi...
0
by: Geoff B via .NET 247 | last post by:
I have a form that displays images using a picturebox. Theseimages are usually too large to fit in the entire screen so iwould like to panel to be scrollable with the mouse. On my form I have 2...
0
by: objectref | last post by:
hi to all, i have a picture box in a scrollable panel control. I can drag and drop the picture box inside the panel to the correct position by taking the MousePosition point and evauatint the...
2
by: UJ | last post by:
I've got area of a screen that needs to be scrollable (it's a long list from a database) but only that section should be scrollable - not the whole page. How do I do this? A panel? TIA - Jeffrey.
0
by: Ethan S. | last post by:
Hi everyone, I'm working on a small little project of mine and got stuck trying to add my own usercontrol into a scrollable object. For example, when a download is initiated under Mozilla...
3
by: Les | last post by:
I was wondering if in Visual Basic.net if Microsoft has made it any easier to scroll within a form. In VB 6 to do that required 2 picture windows that would in effect simulate a scrollable...
5
by: alwayssmiling | last post by:
Hi, I want a scrollable picture box in my application. But picture box can't have auto scroll property on its own. So in order to get scroll for my picture box i placed it in a panel. And set the...
3
by: Nathan Sokalski | last post by:
I am looking to create a multi-column list that is scrollable, kind of like a ListBox control, only I need a way to align the columns of text that I will have (I would use spaces, but because the...
0
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,...
0
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,...
0
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.