[ Suggestion ] Lister scrollbars PageSize calculation

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

[ Suggestion ] Lister scrollbars PageSize calculation

Post by *Alextp »

See the difference between Lister and UV:

http://atorg.net.ru/temp/tcClipboard01.gif
http://atorg.net.ru/temp/tcClipboard02.gif


Lister doesn't calculate scroll bars' PageSize. Why not to add this.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Can you do this w/out reading whole file? I don't think so...
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2m^2
UV does this w/out reading the whole file.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

So I'm for :D
Could you say: how?
You need too know ho meny line breaks are there, don't you?
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2m^2
No: no line breaks.

I use this method:
PageSize is proportional to number of bytes (not lines!!)
currently on screen. Lister should know this number after redraw is complete.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3381
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Alextp wrote:2m^2
UV does this w/out reading the whole file.
What is UV ?
Hoecker sie sind raus!
User avatar
Stitscher
Power Member
Power Member
Posts: 1058
Joined: 2004-02-17, 12:34 UTC
Location: Hamburg, Germany

Post by *Stitscher »

UniversalViewer! ;)
See the link in the first post and search the forum. :lol:
Last edited by Stitscher on 2007-02-22, 17:29 UTC, edited 1 time in total.
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Ok, so it's just approximation. But I'm still for.
Thank you. :)
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

German humour is nice !

Post by *Clo »

2Stitscher

:) Hallo !

 :lol:  :lol:   :lol:

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50930
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Lister uses permille (0-1000) for the scroll bar, that's why it always has the same thumb size.
Author of Total Commander
https://www.ghisler.com
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2ghisler(Author)
Lister uses permille (0-1000) for the scroll bar, that's why it always has the same thumb size.
And what's the problem with permilles? I use Int16 for the scrollbar. But you may also use permilles, no problem with this. You just need to set bar size to a value proportional to visible area.
Post Reply