🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sizing ListView Column when HScrollPos > 0

#3728
From: Bob Gonder
Date: Sat, 29 Apr 2006 20:59
30 lines
2507 bytes
JD wrote:

>> 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.

Well, what I saw was if the mouse is one pixel left of bar, box
collapses at one pixel speed (constant). To mimic normal (non-maxed
scroll bar), moving mouse left at constant speed, to move box right at
constant speed, means instead of taking absolute difference from bar
to mouse for the speed, take difference in movement from last draw to
this, as speed.
Now, that sounds a lot like what you are saying it is doing.
So, the question is...what coordinate system is it using?
If it is measuring mouse position from left-most (hidden box) edge,
then you would still see larger movement than the absolute
screen-coordinate movement.

>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!

Which would indicate that you are reading client (box) coordinates at
a time when you really want to know the real-world (screen)
coordinates. There _are_ conversion routines somewhere in the api.....
Technical Details
Message-ID: <65k752po16q79kat37qnc6j7tn8a86sr9t@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.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> <44539d56$1@newsgroups.borland.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: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Sizing ListView Column when HScrollPos > 0
Date: Sat, 29 Apr 2006 13:59:55 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <65k752po16q79kat37qnc6j7tn8a86sr9t@4ax.com>
References: <4453413e$1@newsgroups.borland.com> <3pt652pq4hdn1fn56cpgn1jkps35652csj@4ax.com> <44539d56$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 4.246.206.223
X-Trace: newsgroups.borland.com 1146344393 4.246.206.223 (29 Apr 2006 13:59:53 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.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