🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3725

Re: Sizing ListView Column when HScrollPos > 0

#3725
From: JD
Date: Sat, 29 Apr 2006 17:07
52 lines
2813 bytes
Bob Gonder <notbg@notmindspring.invalid> wrote:
>
> What I observe is this. [...]

I saw the same but hadn't noticed that behavior until I tested
it with Windows Explorer.

> I'd leave it alone,

I don't think that I can because when running my code, even
though it behaves the same, it's much more dramatic because
I've optimized the drawing to eliminate flickering. Even worse,
If the scrolled area is large enough, it will collapse a column
entirely in the blink of an eye.

> limit mouse movement to 1 or 2 pixels (limits shrinking to
> one or two pixel speed)

This isn't possible. I logged the messages and there getting
processed on a per pixel basis. Sure there were a couple that
slipped through that were multiple pixels but they required
effort on my part to effect them.

> reset mouse to bar. If mouse moves faster, box shrinks
> faster. If mouse stops, box stops.

At this point, I'm thinking that the mouse is going to have to
be repositioned but I *really* don't wanna do that.

> Third option would be to somehow remember last mouse
> position, and only reduce the box by the delta rather than
> the absolute.

I'm not sure what you mean by this. The code currently saves
the click point, makes the size change and then updates the
click point to the current point. The change in size is
calculated by comparing the click point to the current point.

What the ultimate problem is that when the column size changes,
the scrollbar is affected which causes a redraw because the
window is no longer scrolled to that position.

If the mouse it at 100 and moved to 99, after that one pixel
move has been processed and the window is redrawn, the mouse
is now at 98 even though it wasn't moved! (your observations
seem to confirm this).

I'm hoping that it's just a not-so-simple logic problem that
another pair of eyes can see.

~ JD
Technical Details
Message-ID: <44539d56$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4453413e$1@newsgroups.borland.com> <3pt652pq4hdn1fn56cpgn1jkps35652csj@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6756aa08d2757c32
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: Re: Sizing ListView Column when HScrollPos > 0
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 205.188.116.136     
X-Forwarded-For: 172.134.1.47
References: <4453413e$1@newsgroups.borland.com> <3pt652pq4hdn1fn56cpgn1jkps35652csj@4ax.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44539d56$1@newsgroups.borland.com>
Date: 29 Apr 2006 10:07:34 -0700
X-Trace: newsgroups.borland.com 1146330454 207.105.83.66 (29 Apr 2006 10:07:34 -0700)
Lines: 53
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail