When you increase width of a listbox (using Windows API or any window tool), normally ammount of visible data should be increased. However in case of horizontal TMyListBox'es in buttonbar configuration dialog, item width is increased instead. Resizing LCLListBox'es in 64-bit TC works as expected, number of visible items increased.
Please check this screenshot for better understanding. When TMyListBox width is increased, it increases width of elements, so large gaps appear.
This bug may not be seen in TC w/o using plugins or external tools, but I think it shouldn't be hard to fix. This is essential for proper resizing buttonbar configuration window using third-party tools for increasing number of visible buttons on large screens.
[9.50b8 x86] Resizing horizontal TMyListBox with images stretches items
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [9.50b8 x86] Resizing horizontal TMyListBox with images stretches items
It's a multi-column listbox with fixed number of entries.
How did you resize the dialog? It's not resizeable.
How did you resize the dialog? It's not resizeable.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [9.50b8 x86] Resizing horizontal TMyListBox with images stretches items
Is fixed number of entries necessary? Can't you fix item size instead? File panels use the same TMyListBox component but may be resized and properly react on resizing (more columns appear).
Dialog may be resized using Windows API functions like MoveWindow or SetWindowPos. You have to resize dialog first, then move its right-aligned controls and resize width-aligned controls. People have to create tools that do this because it is not resizable by design but there is a huge benefit from resizing it on large screens (same applies to change attributes dialog and some other fixed-size TC dialogs). And currently this TMyListBox nuance is the only obstacle that doesn't allow to resize this dialog in 32-bit TC (in 64-bit TC there is no such problem because component properly reacts on resizing).
Dialog may be resized using Windows API functions like MoveWindow or SetWindowPos. You have to resize dialog first, then move its right-aligned controls and resize width-aligned controls. People have to create tools that do this because it is not resizable by design but there is a huge benefit from resizing it on large screens (same applies to change attributes dialog and some other fixed-size TC dialogs). And currently this TMyListBox nuance is the only obstacle that doesn't allow to resize this dialog in 32-bit TC (in 64-bit TC there is no such problem because component properly reacts on resizing).
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [9.50b8 x86] Resizing horizontal TMyListBox with images stretches items
It's not so easy to change, the listbox has a property "columns" which is set to 9.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [9.50b8 x86] Resizing horizontal TMyListBox with images stretches items
That's sad... It would be great though to add support for non-fixed number of visible items in such mode.
Or maybe you make this dialog a bit wider? It is only 568 pixels in width so there is a space for increment, there is no Windows monitors that support less than 640 pixels in width.
Or maybe you make this dialog a bit wider? It is only 568 pixels in width so there is a space for increment, there is no Windows monitors that support less than 640 pixels in width.

Re: [9.50b8 x86] Resizing horizontal TMyListBox with images stretches items
Hi, is there a chance to see any improvements here? Dialog still shows only 9 buttons but TC buttonbar at half of screen today can show three times more, and maximized TC can show even more, so we have to scroll and scroll...
I still think that you should fix item width and not item count in listbox, in such case one could resize dialog with a script and see more icons. I've just checked, if I send LB_SETCOLUMNWIDTH message to TMyListBox in toolbar configuration dialog, it properly shows any number of icons, depending on column width I specify, but if I resize listfox after sending the message, number of columns doesn't change again, so I have to re-send the message after every resize. I think it would be better if TC would send the message itself, or set column width initially and do not fix number of columns. As I discovered, default column width in this dialog is 39 in TCx86 and 37 in TCx64 (and column width is already fixed in 64-bit version, so more icons appear if listbox is enlarged).
I still think that you should fix item width and not item count in listbox, in such case one could resize dialog with a script and see more icons. I've just checked, if I send LB_SETCOLUMNWIDTH message to TMyListBox in toolbar configuration dialog, it properly shows any number of icons, depending on column width I specify, but if I resize listfox after sending the message, number of columns doesn't change again, so I have to re-send the message after every resize. I think it would be better if TC would send the message itself, or set column width initially and do not fix number of columns. As I discovered, default column width in this dialog is 39 in TCx86 and 37 in TCx64 (and column width is already fixed in 64-bit version, so more icons appear if listbox is enlarged).