Problem with a fixed position text line in wxScrolledWindow

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Super wx Problem Solver
Super wx Problem Solver
Posts: 387
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Problem with a fixed position text line in wxScrolledWindow

Post by Widgets » Mon Nov 12, 2007 11:39 pm

Hi, I'm trying to follow the example in topic 12535 which almost works on my machine - keeping a vertical line in a nearly fixed position when the window is scrolled.

On my machine - WinXP, Microsoft Visual Studio C++ 2005, wxWidgets 2.8.6 - the line stays in the same position as long as I don't switch direction - at least most of the time. There are times, when I move the slider up or down, the line also jumps, but then stays put for much of the rest of the travel.

Each time I switch direction, the line hops up or down a bit, depending on size of the scroll rate setting.
Not too surprisingly, the larger the step size, the larger the hop up or down.

This also happens when I switch between using the mouse and keyboard for scrolling the window

Is there a fix? or am I missing something?
Is this a Windows problem?

My real intent is to try and keep a header line as the top visible line, while the rest of the window content is scrolled. The same problem happens for either a plain graphics line or a line of horizontal text.
Environment: Win 10 64-bit & Mint 10.2
MSVC Express 2010, 2015, 2017, 2019
wxWidgets 3.1.2
Fight SPAM - report it with wxSR

Post Reply