Can't detect a problem with the latest version. Do you have a demo code?doctorized wrote:Tried your last version from today but nothing changed. What exact command should I use?Thorsten1867 wrote:Try version from 10.11.2019.doctorized wrote: ...but auto resizing columns' width is not working.
[Modules] ListEx (all OS / DPI)
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Re: [Modules] ListEx (all OS / DPI)
@Thorsten1867,
I have checked out your latest update and as expected it cures the problem.
Thank you.
However, I feel I must apologise for not having taken the time to create the demo 'ere posting the first bug report.
You are doing all the hard work here and my demo would have saved you some time.
I have checked out your latest update and as expected it cures the problem.

Thank you.
However, I feel I must apologise for not having taken the time to create the demo 'ere posting the first bug report.
You are doing all the hard work here and my demo would have saved you some time.

DE AA EB
- doctorized
- Addict
- Posts: 882
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
Thorsten1867 wrote:Can't detect a problem with the latest version. Do you have a demo code?doctorized wrote:Tried your last version from today but nothing changed. What exact command should I use?Thorsten1867 wrote:Try version from 10.11.2019.doctorized wrote: ...but auto resizing columns' width is not working.
Code: Select all
PurifierGranularity(1,1,1,1)
XIncludeFile "ListExModule.pbi"
Global FontName.s = "Arial"
Global FontSize.a = 11
Enumeration
#Font_Custom
#Font_Custom_B
#MainWindow
EndEnumeration
LoadFont(#Font_Custom, FontName, FontSize)
LoadFont(#Font_Custom_B, FontName, FontSize, #PB_Font_Bold)
If OpenWindow(#MainWindow, 0, 0, 800, 800, "test", #PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
ListEx::Gadget(123,10,40,WindowWidth(#MainWindow)-20,WindowHeight(#MainWindow)-170, "col 1", 30, "", ListEx::#GridLines|ListEx::#AutoResize)
ListEx::AddColumn(123,1,"col 2",200)
ListEx::AddColumn(123,2,"col 3",200)
ListEx::DisableReDraw(123, #True)
ListEx::SetHeaderAttribute(123, ListEx::#Align, ListEx::#Center)
ListEx::SetFont(123, FontID(#Font_Custom))
ListEx::SetFont(123, FontID(#Font_Custom_B), ListEx::#HeaderFont)
ListEx::SetRowsHeight(123, 22)
ListEx::SetAutoResizeFlags(123, ListEx::#Height)
ListEx::SetAutoResizeFlags(123, ListEx::#Width)
ListEx::SetColorTheme(123, ListColorTheme)
;ListEx::SetColor(123, ListEx::#AlternateRowColor, $FBF7F5)
ListEx::DisableReDraw(123, #False)
For i=1 To 10
ListEx::AddItem(123, -1, "a" + Str(i) + #LF$ + "b" + Str(i) + #LF$ + "c" + Str(i))
Next
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Done = #True
EndSelect
Until Done
EndIf
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Code: Select all
XIncludeFile "ListExModule.pbi"
Enumeration
#Font_Custom
#Font_Custom_B
#MainWindow
#List
EndEnumeration
LoadFont(#Font_Custom, "Arial", 11)
LoadFont(#Font_Custom_B, "Arial", 11, #PB_Font_Bold)
If OpenWindow(#MainWindow, 0, 0, 460, 400, "test", #PB_Window_ScreenCentered|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget) ; #PB_Window_SizeGadget must be used to change the window size.
ListEx::Gadget(#List, 10, 40, 440, 350, "col 1", 40, "", ListEx::#GridLines|ListEx::#AutoResize)
ListEx::AddColumn(#List,1,"col 2",200) ; Columns must be adapted to the list width.
ListEx::AddColumn(#List,2,"col 3",200) ; Columns must be adapted to the list width.
ListEx::SetHeaderAttribute(#List, ListEx::#Align, ListEx::#Center)
ListEx::SetFont(#List, FontID(#Font_Custom))
ListEx::SetFont(#List, FontID(#Font_Custom_B), ListEx::#HeaderFont)
ListEx::SetRowsHeight(#List, 22)
; --- AutoResize ListEx-Gadget ---
ListEx::SetAutoResizeColumn(#List, 1) ; A column must be defined that is to be adapted.
ListEx::SetAutoResizeFlags(#List, ListEx::#Height|ListEx::#Width) ; Flags must be linked
; --------------------------------
ListEx::SetColorTheme(#List, ListColorTheme)
For i=1 To 10
ListEx::AddItem(#List, -1, "a" + Str(i) + #LF$ + "b" + Str(i) + #LF$ + "c" + Str(i))
Next
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Done = #True
EndSelect
Until Done
EndIf
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Re: [Modules] ListEx (all OS / DPI)
Three bugs when using the demo code
01. After starting the demo code, right click anywhere in the list view to get the context menu
Choose: Theme '<xxx>' (it doesn't matter which one)
-> All buttons in the right column turn black (their background color)
02. After starting the demo code, none of the three theme buttons on the right do anything when clicked (the column header of the list view doesn't change its color like when you use the context menu)
03. After starting the demo code, click on the "Resize" button. The code will stop on line 7442: The specified #Gadget is not initialised
ListEx is up to date
PureBasic 5.71 LTS x64
01. After starting the demo code, right click anywhere in the list view to get the context menu
Choose: Theme '<xxx>' (it doesn't matter which one)
-> All buttons in the right column turn black (their background color)
02. After starting the demo code, none of the three theme buttons on the right do anything when clicked (the column header of the list view doesn't change its color like when you use the context menu)
03. After starting the demo code, click on the "Resize" button. The code will stop on line 7442: The specified #Gadget is not initialised
ListEx is up to date
PureBasic 5.71 LTS x64
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Demo code fixed
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 882
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
I want all columns to resize, not just one.
Re: [Modules] ListEx (all OS / DPI)
Hey WOW, this module has become amazing
Prolific amount of work.

Prolific amount of work.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
That's not possible.doctorized wrote:I want all columns to resize, not just one.
Gesendet von meinem Aquaris X2 mit Tapatalk
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Re: [Modules] ListEx (all OS / DPI)
@Thorsten1867,
Would it be possible for me to display a rectangle of thumbnails with ListEx, or have you designed this facility for small symbols only?
Would it be possible for me to display a rectangle of thumbnails with ListEx, or have you designed this facility for small symbols only?
DE AA EB
- doctorized
- Addict
- Posts: 882
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
But your version from 4.08.2019 that I used previously could resize all columns including the headers. What happened and lost this option?Thorsten1867 wrote:That's not possible.doctorized wrote:I want all columns to resize, not just one.
Gesendet von meinem Aquaris X2 mit Tapatalk
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Up to now only one column could be adjusted.doctorized wrote:Thorsten1867 wrote:But your version from 4.08.2019 that I used previously could resize all columns including the headers. What happened and lost this option?
If all columns were adjusted, they would all have to be the same size, otherwise negative column widths could occur.
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
This should only depend on the row height.davido wrote:Would it be possible for me to display a rectangle of thumbnails with ListEx, or have you designed this facility for small symbols only?
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
- doctorized
- Addict
- Posts: 882
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: [Modules] ListEx (all OS / DPI)
You are wrong, it is accomplished with ListEx::#FitColumn. I had forgotten this option. My bad.Thorsten1867 wrote:Up to now only one column could be adjusted.doctorized wrote:Thorsten1867 wrote:But your version from 4.08.2019 that I used previously could resize all columns including the headers. What happened and lost this option?
If all columns were adjusted, they would all have to be the same size, otherwise negative column widths could occur.
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
#FitColumn adjusts the column width to the maximum text width.
Gesendet von meinem BAH2-W19 mit Tapatalk
Gesendet von meinem BAH2-W19 mit Tapatalk
Translated with http://www.DeepL.com/Translator
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]
Download of PureBasic - Modules
Download of PureBasic - Programs
[Windows 11 x64] [PB V5.7x]