TC7.02a/Listbox inconsistencies

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
User avatar
white
Power Member
Power Member
Posts: 5785
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

TC7.02a/Listbox inconsistencies

Post by *white »

The listboxes in Total Commander are very inconsistent.

The listboxes seem to be designed to always have an entry selected. When the listbox receives focus a rectangle is shown on the selected entry.

Listbox of Change Start menu
* When the dialog is opened the first entry is selected
* One entry is always selected
* Selection after deletion -> next entry (previous entry if there is no next entry)
* When the listbox has focus a dotted rectangle is visible on the selected entry
* When the listbox has focus and the listbox is empty no rectangle is visible

Listbox of Change directory hotlist
* Same as above

Listbox of Search Load/Save
* When the dialog is opened no entry is selected
* After deleting top entry no entry is selected
* Once an entry is selected, it is not possible to have no entry selected (except the mentioned method of deleting the top entry)
* Selection after deletion -> previous entry (only listbox in Total Commander that behaves like this?)
* When the listbox has focus and one entry is selected a dotted rectangle is visible on the selected entry
* When the listbox has focus and no entry is selected a dotted rectangle is visible on the top entry
* When the listbox has focus and the listbox is empty a dotted rectangle is visible on the top entry

Listbox of Configuration - Custom columns
* When the dialog is opened no entry is selected (except when something is changed and saved and the dialog is closed and reopened later)
* Once an entry is selected, it is not possible to have no entry selected
* Selection after deletion -> next entry (previous entry if there is no next entry)
* When the listbox has focus a dotted rectangle is visible on the selected entry
* When the listbox has focus and no entry is selected a dotted rectangle is visible on the top entry
* When the listbox has focus and the listbox is empty a dotted rectangle is visible on the top entry

Listbox of FTP Connect
* When the dialog is opened the entry is selected which was last selected the previous time
* After deleting top entry no entry is selected
* When there are only two entries and one of them is deleted, no entry is selected
* Once an entry is selected, it is not possible to have no entry selected (except the mentioned methods above)
* Selection after deletion -> next entry (previous entry if there is no next entry, except when there is only one entry left)
* When the listbox has focus and one entry is selected a dotted rectangle is visible on the selected entry
* When the listbox has focus and no entry is selected a dotted rectangle is visible on the top entry
* When the listbox has focus and the listbox is empty a dotted rectangle is visible on the top entry

Listbox of Custom fields by file type opened by clicking "+" button in the Copy overwrite dialog
* When the dialog is opened the first entry is selected
* After editing an entry no entry is selected
* Selection after deletion -> next entry (previous entry if there is no next entry)
* When the listbox has focus and one entry is selected a dotted rectangle is visible on the selected entry
* When the listbox has focus and no entry is selected a dotted rectangle is visible on the top entry
* When the listbox has focus and the listbox is empty no rectangle is visible
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The listboxes seem to be designed to always have an entry selected. When the listbox receives focus a rectangle is shown on the selected entry.
This is done because it is VERY annoying when there is nothing selected, because nothing happens when you press ENTER. Therefore TC always tries to focus an item. But it's a fight against the windmills of Windows, there will always be situations where windows steals the selection somehow...
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5785
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:
The listboxes seem to be designed to always have an entry selected. When the listbox receives focus a rectangle is shown on the selected entry.
This is done because it is VERY annoying when there is nothing selected, because nothing happens when you press ENTER.
Agreed.
ghisler(Author) wrote:Therefore TC always tries to focus an item. But it's a fight against the windmills of Windows, there will always be situations where windows steals the selection somehow...
Are you saying you can not use the same code used for the listbox of Change Start menu for all listboxes?


And what about:
Listbox of Search Load/Save
..
* Selection after deletion -> previous entry (only listbox in Total Commander that behaves like this?)
And this one is quite weird:
Listbox of FTP Connect
..
* When there are only two entries and one of them is deleted, no entry is selected
To see why this is weird: try deleting all entries one by one starting at the bottom going up. When there are two entries left, suddenly the selection is gone (in contrast with the other listboxes).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Are you saying you can not use the same code used for the listbox of Change Start menu for all listboxes?
The selection is done in the code which fills in the listbox, not in the listbox itself.
Author of Total Commander
https://www.ghisler.com
Post Reply