Page 17 of 33
Re: [Modules] ListEx (all OS / DPI)
Posted: Wed Nov 20, 2019 8:53 pm
by Thorsten1867
doctorized wrote:Thorsten1867 wrote:doctorized wrote: ...but auto resizing columns' width is not working.
Try version from 10.11.2019.
Tried your last version from today but nothing changed. What exact command should I use?
Can't detect a problem with the latest version. Do you have a demo code?
Re: [Modules] ListEx (all OS / DPI)
Posted: Wed Nov 20, 2019 9:18 pm
by davido
@
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.

Re: [Modules] ListEx (all OS / DPI)
Posted: Wed Nov 20, 2019 9:23 pm
by doctorized
Thorsten1867 wrote:doctorized wrote:Thorsten1867 wrote:doctorized wrote: ...but auto resizing columns' width is not working.
Try version from 10.11.2019.
Tried your last version from today but nothing changed. What exact command should I use?
Can't detect a problem with the latest version. Do you have a demo code?
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
Re: [Modules] ListEx (all OS / DPI)
Posted: Thu Nov 21, 2019 8:26 am
by Thorsten1867
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
Re: [Modules] ListEx (all OS / DPI)
Posted: Thu Nov 21, 2019 10:27 am
by camille
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
Re: [Modules] ListEx (all OS / DPI)
Posted: Thu Nov 21, 2019 2:58 pm
by Thorsten1867
Demo code fixed
Re: [Modules] ListEx (all OS / DPI)
Posted: Thu Nov 21, 2019 6:09 pm
by doctorized
I want all columns to resize, not just one.
Re: [Modules] ListEx (all OS / DPI)
Posted: Thu Nov 21, 2019 7:05 pm
by skywalk
Hey WOW, this module has become amazing
Prolific amount of work.
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 7:10 am
by Thorsten1867
doctorized wrote:I want all columns to resize, not just one.
That's not possible.
Gesendet von meinem Aquaris X2 mit Tapatalk
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 5:28 pm
by davido
@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?
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 5:42 pm
by doctorized
Thorsten1867 wrote:doctorized wrote:I want all columns to resize, not just one.
That's not possible.
Gesendet von meinem Aquaris X2 mit Tapatalk
But your version from 4.08.2019 that I used previously could resize all columns including the headers. What happened and lost this option?
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 6:03 pm
by Thorsten1867
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?
Up to now only one column could be adjusted.
If all columns were adjusted, they would all have to be the same size, otherwise negative column widths could occur.
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 6:05 pm
by Thorsten1867
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?
This should only depend on the row height.
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 7:00 pm
by doctorized
Thorsten1867 wrote: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?
Up to now only one column could be adjusted.
If all columns were adjusted, they would all have to be the same size, otherwise negative column widths could occur.
You are wrong, it is accomplished with
ListEx::#FitColumn. I had forgotten this option. My bad.
Re: [Modules] ListEx (all OS / DPI)
Posted: Fri Nov 22, 2019 7:19 pm
by Thorsten1867
#FitColumn adjusts the column width to the maximum text width.
Gesendet von meinem BAH2-W19 mit Tapatalk