473,729 Members | 2,186 Online
Bytes | Software Development & Data Engineering Community
+ 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 "subcontrol s": 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|Us erPaint|AllPain tingInWmPaint, 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!


Apr 4 '07 #1
0 1441

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

Similar topics

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. It would have a few buttons as function controls and one main scrollable panel that acts like a terminal window. I want to make it so that clicking on a button that performs an operation will output it to the scrollable wxpython terminal panel,...
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 Pakistan *** Sent via Developersdex http://www.developersdex.com ***
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 panels, 1 docked left with some text boxesand a list on it, a splitter docked left, and then a 2nd panelset to fill. The auto scroll property is set to true on the 2ndpanel. This panel has a large colored label as a background forthe picturebox. The...
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 relative edge of the main form So far so good. The problem is that if i scroll down the panel a little, my picture box cannot place itself
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.
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 Firefox, an entry will be added into the download window's panel/groupbox/whatever that is. Please advise on what object/control to use to accomplish this task. I have considered using a panel, but the panel control does not provide automatic...
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 viewport. I was wondering what components or etc are available in VB.net that would allow this?? Thanks in advance, Les
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 auto scroll proeprty of the panel to true. And the picture box size mode property to auto size mode. If i follow this approach, if the image size is bigger than picture box size then only its showing the scroll. On other scenarios, scroll is not...
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 ListBox normally uses a variable-width font, that would not work). Is there a control like the DataList (a control that uses templates and databinding) that displays the items in a scrollable manner? One idea that I had, although it sounds rather...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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...
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
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.