[Modules] ListEx (all OS / DPI)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

Bitblazer wrote:Nice module, but is it possible to create lines with different colors?
Why don't you try SetItemColor() ?
With ListIconGadget(), you would also need to use SetGadgetItemColor() and not SetGadgetColor(). :wink:
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
tatanas
Enthusiast
Enthusiast
Posts: 260
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: [Modules] ListEx (all OS / DPI)

Post by tatanas »

It's almost good :?
It works well until you scroll to the right (in your example). Left-Right arrow cursor then stay even if the cursor is not on a separator or flickers again.

Thanks you for your time.
Windows 10 Pro x64
PureBasic 6.20 x64
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

I hope my changes will help.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
tatanas
Enthusiast
Enthusiast
Posts: 260
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: [Modules] ListEx (all OS / DPI)

Post by tatanas »

Nice job !

Another small bug (just need a refresh I suppose)
In your example :
- Scroll the listview to the right at maximum
- Resize the window until scrollbars disappear
See the display problem ?
Windows 10 Pro x64
PureBasic 6.20 x64
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

Bugfix
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
tatanas
Enthusiast
Enthusiast
Posts: 260
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: [Modules] ListEx (all OS / DPI)

Post by tatanas »

Thanks, That's perfect ! :D

About the drag and drop functionality between rows, to reorganize them, do you think it's doable ?
It could be just one row at a time.

Edit : What do you think about closing the string edit field when escaping ?
Edit2 : I just tried to make 2 "button columns", when I apply an image to one of the 2 buttons, it applies to the other button too.
Windows 10 Pro x64
PureBasic 6.20 x64
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

tatanas wrote:About the drag and drop functionality between rows, to reorganize them, do you think it's doable ?
It could be just one row at a time.
I think this is very complicated and it would probably confuse the data.
tatanas wrote:Edit : What do you think about closing the string edit field when escaping ?
Fixed!
tatanas wrote: : I just tried to make 2 "button columns", when I apply an image to one of the 2 buttons, it applies to the other button too.
What order are you using? It works in my example.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
tatanas
Enthusiast
Enthusiast
Posts: 260
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: [Modules] ListEx (all OS / DPI)

Post by tatanas »

I think this is very complicated and it would probably confuse the data.
I understand.

You're right, the problem I had with button in the columns was my fault.

Another question : is it possible to use ExtractIconEx_() to get an icon for the button ?
I use it then passed to SetItemImageHwnd() (I duplicate your SetItemImage() and remove the ImageId() part because I already got an handle from ExtractIconEx_) and it doesn't work.
Windows 10 Pro x64
PureBasic 6.20 x64
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

Update:
  • Changed: SetItemImage(GNum.i, Row.i, Column.i, Image.i, Align.i=#Left, Width.i=#PB_Default, Height.i=#PB_Default)
  • Added: SetItemImageID(GNum.i, Row.i, Column.i, Width.f, Height.f, ImageID.i, Align.i=#Left)
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: [Modules] ListEx (all OS / DPI)

Post by DK_PETER »

That is some seriously nice work you've done.
Thank you for making your modules available.
Best regards
Peter
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Oliver13
User
User
Posts: 90
Joined: Thu Sep 30, 2010 6:40 am

Re: [Modules] ListEx (all OS / DPI)

Post by Oliver13 »

First, I want to thank you again for your hard work and the great controls.

I found following small bugs:

- if you compile the sample, the first row is not displayed.
You need to scroll down; if you then scroll upwards, the 1st row appears

- the sort routine seem not to work.

I added the following line to the sample:

Code: Select all

 ListEx::Sort(#list,2, #PB_Sort_Ascending,listex::#SortString|ListEx::#Deutsch) 
But there is no sorting, while sorting by headerclick works.
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

Bugfixes
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Modules] ListEx (all OS / DPI)

Post by davido »

@Thorsten1867,
Is it possible to make the text in a column header wrap rather than spill over into the column header on the right?
DE AA EB
User avatar
Thorsten1867
Addict
Addict
Posts: 1372
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] ListEx (all OS / DPI)

Post by Thorsten1867 »

Do you use MacOS?

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]
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: [Modules] ListEx (all OS / DPI)

Post by davido »

@Thorsten1867,
I did, actually, observe the problem on my MacBook.
However, upon checking on a Windows 10 machine, I observed the same problem.

The cells had the same height, sufficient for 3 lines of text.
The text spilled into an empty cell on the right.
It would overwrite text if present in the cell on the right. No text was erased.

Tested with PureBasic 5.70 x64.
DE AA EB
Post Reply