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
TC7.02a/Listbox inconsistencies
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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...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.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Agreed.ghisler(Author) wrote:This is done because it is VERY annoying when there is nothing selected, because nothing happens when you press ENTER.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.
Are you saying you can not use the same code used for the listbox of Change Start menu for all listboxes?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...
And what about:
And this one is quite weird:Listbox of Search Load/Save
..
* Selection after deletion -> previous entry (only listbox in Total Commander that behaves like this?)
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).Listbox of FTP Connect
..
* When there are only two entries and one of them is deleted, no entry is selected
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
The selection is done in the code which fills in the listbox, not in the listbox itself.Are you saying you can not use the same code used for the listbox of Change Start menu for all listboxes?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com