cm_countdircontent sometimes scrolls listbox

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

cm_countdircontent sometimes scrolls listbox

Post by *StatusQuo »

If a file is selected, that is not currently displayed in the file list, cm_countdircontent automatically scrolls the file list, depending on the current cursor position.
If no file is selected, there is no automatic scrolling caused by cm_countdircontent.

To reproduce:
  • go to a directory that contains subdirs and more files than can be displayed in the current window (listbox), use of PageUp/PageDown should be possible at least once.
  • activate long view (Ctrl+F2)
  • press PageDown twice
  • select some file(s) that you see there
  • press Home to scroll back to the top of the list
    (the selected file now should NOT be displayed - if it is, you could reduce TC's window size)
  • place the cursor somewhere in the middle of the displayed part of the list
  • call cm_countdircontent
:arrow: the display automatically scrolls down,
the file under cursor moves from the middle of the screen to the top (if there are enough files behind it).

Details:
If the first selected file is higher than the upper end of the currently viewed part of the list, then cm_countdircontent scrolls the file list to display
the file under the cursor in the last line.

If the first selected file is lower than the lower end of the currently viewed part of the list, then cm_countdircontent scrolls the file list to display
the file under the cursor in the first line.

If no file is selected, there is no scrolling at all.

Expected behaviour:
There should be no scrolling of the displayed file list/listbox initiated by cm_countdircontent - no matter if in long/short view or if file are selected or not.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

Confirm.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately the scrolling cannot be prevented when setting the cursor to a certain file, sorry. It's actually a bug in the themed listbox control of Windows XP/Vista only. On other Windows versions it's possible to set the cursor position without moving the list.

Why is it necessary to set the cursor position? If the sort order is set to size, and directory sorting is on, then the currently selected item (directory) may change its position in the list!
Author of Total Commander
https://www.ghisler.com
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Same here and question

Post by *Clo »

2StatusQuo

:) Hello !

• Confirmed here too. I noticed the same behaviour when the marked¦selected item is a sub-directory instead of a file.
- I mean : When there is a lot of sub-dirs. and the marked one is not visible (located beyong the bottom of the list).

- A covering (minor ?) question should be:
- “How long the sizes must be be displayed ? ” Currently, they are removed as soon as you open any sub-dir., for instance.
- Since I use the command from a button, I'ld prefer that this command be bistable (ON¦OFF).
- Doing so, I could get the sizes still after I open¦close a sub-dir, or else - in the opposite- remove the indications at will
pressing the button again to get [OFF] without anything more…

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Flint
Power Member
Power Member
Posts: 3501
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

ghisler(Author) wrote:Why is it necessary to set the cursor position? If the sort order is set to size, and directory sorting is on, then the currently selected item (directory) may change its position in the list!
But when I tested, I had the file list sorted by name, not by size. Maybe, if size-sorting is not used, just not re-position the cursor?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

No theme

Post by *Clo »

2ghisler(Author)

:) Good evening,
…It's actually a bug in the themed listbox control of Windows XP/Vista only. …
• I don't use any XP theme (Win9x style here) but I get that behaviour all the same…

• What about the duration of the size display¦remove means ?

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

2ghisler(Author)
It's actually a bug in the themed listbox control of Windows XP/Vista only. On other Windows versions it's possible to set the cursor position without moving the list.
I get this behaviour using TC 7.02a in Win2k SP4 (theme in windows display settings is set to "Windows-Standard").
(I forgot to write this in the first post, sorry.)
Am I right, that TC generally doesn't try to avoid scrolling, also in other windows versions?
Flint wrote:Maybe, if size-sorting is not used, just not re-position the cursor?
This sounds like a possible solution to me, isn't it?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Folders by name, files by ext.

Post by *Clo »

2StatusQuo

:) Hi !

• I sort the files by extension (thus, then by names, and the folders always by names).
- That doesn't prevent to get the hitch… Win 9x theme under XP-Pro SP1.

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply