Please test if the problem is solved now.Paul wrote:Just a note...
when resizing Columns, your Columns don't follow the scrollbar so if you move the scrollbar you can no longer select the column to resize it.
[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)
Still has problem. 
When you move the bottom slider the column locations become incorrect.
Maybe this shows problem better...
https://youtu.be/nwBpHijXkwc

When you move the bottom slider the column locations become incorrect.
Maybe this shows problem better...
https://youtu.be/nwBpHijXkwc
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Try it again
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)
Seems to be a number of problems related to column resizing.
If I click on a checkbox in the checkbox column (first column), sometimes it toggles the checkbox and other times it goes into column resize mode. Also if I start to edit a column and then go to change column size, the edit box randomly appears when the column is resized off the screen.

If I click on a checkbox in the checkbox column (first column), sometimes it toggles the checkbox and other times it goes into column resize mode. Also if I start to edit a column and then go to change column size, the edit box randomly appears when the column is resized off the screen.

- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Updates:
- only header resize columns
- scrollbar closes editable cells
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)
Update:
Code: Select all
;{ ___ Format Content (Mask) ___
; Floats: "0.00" or "0,000"
; Integer: "." or "," or "1.000" or "1,000"
; Date: "%dd.%mm.%yyyy"
; Time: "%hh:%ii:%ss"
; Cash: "0,00 €" or "$ 0.00"
;}
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)
Finally had a change to come back to this and give it another try.
First thing I'm greeted with when I run the module is...
[14:13:38] [COMPILER] Line 1708: With 'EnableExplicit', variables have to be declared: DSep$.
Curious how you did not get this error when testing the code?
Anyway, when resizing columns the standard Windows behavior is to not stop resizing until the mouse button is released. Currently if you move the mouse pointer outside the header area the resizing stops even if I'm pressing the button. When I do release the button and then move back to the header area, the column will suddenly grab and start resizing again for no reason... since I'm no longer holding the button.
I can post another screen recording of this behavior if you need to see it?
First thing I'm greeted with when I run the module is...
[14:13:38] [COMPILER] Line 1708: With 'EnableExplicit', variables have to be declared: DSep$.
Curious how you did not get this error when testing the code?
Anyway, when resizing columns the standard Windows behavior is to not stop resizing until the mouse button is released. Currently if you move the mouse pointer outside the header area the resizing stops even if I'm pressing the button. When I do release the button and then move back to the header area, the column will suddenly grab and start resizing again for no reason... since I'm no longer holding the button.
I can post another screen recording of this behavior if you need to see it?
Re: [Modules] ListEx (all OS / DPI)
I keep adding lines with ListEx::#LastItem as position.
If i add 10 lines and have 5 visible, how can i keep the last added line always visible?
If i add 10 lines and have 5 visible, how can i keep the last added line always visible?
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
BugfixesPaul wrote:[14:13:38] [COMPILER] Line 1708: With 'EnableExplicit', variables have to be declared: DSep$.
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)
Hi,
You did a wonderfull module Thorsten1867 !
I found a strange behavior in the example.
I don't know if it's a bug, but when you click in the header then move above the left or right vertical line column limit, the resize column event is triggered.
I suppose it shouldn't.
Found another problem :
When resizing column, the cursor flickers during mouse move above the column separator area (+/- offset) because it's reseting to default cursor.
When resizing column with small helping grip separator area (by example : -2 pixels + 2 pixel from cols()\X), there is 2 possibilities : the zone after the first separator "| <- |" and the zone before the second separator "| -> |". In the first case, the column resized should be the previous one.
You did a wonderfull module Thorsten1867 !
I found a strange behavior in the example.
I don't know if it's a bug, but when you click in the header then move above the left or right vertical line column limit, the resize column event is triggered.
I suppose it shouldn't.
Found another problem :
When resizing column, the cursor flickers during mouse move above the column separator area (+/- offset) because it's reseting to default cursor.
When resizing column with small helping grip separator area (by example : -2 pixels + 2 pixel from cols()\X), there is 2 possibilities : the zone after the first separator "| <- |" and the zone before the second separator "| -> |". In the first case, the column resized should be the previous one.
Windows 10 Pro x64
PureBasic 6.20 x64
PureBasic 6.20 x64
Re: [Modules] ListEx (all OS / DPI)
Ok, I made some changes to your code. I hope it's not too messy.
I added a procedure to get current column width : GetColumnWidth_(X.i)
modified _LeftButtonDownHandler() and _MouseMoveHandler() to get ride of the small bugs I mentionned in my previous post.
https://drive.google.com/drive/folders/ ... sp=sharing
EDIT : Do you think you could add a drag & drop inside the listview to reorganize rows ?
I added a procedure to get current column width : GetColumnWidth_(X.i)
modified _LeftButtonDownHandler() and _MouseMoveHandler() to get ride of the small bugs I mentionned in my previous post.
https://drive.google.com/drive/folders/ ... sp=sharing
EDIT : Do you think you could add a drag & drop inside the listview to reorganize rows ?
Windows 10 Pro x64
PureBasic 6.20 x64
PureBasic 6.20 x64
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Bugfixes
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)
Thanks for the fixes.
The cursor still flickers (changing from default to left/right) when hovering the column separator. You need some changes at line 4868.
I did that :
The cursor still flickers (changing from default to left/right) when hovering the column separator. You need some changes at line 4868.
I did that :
Code: Select all
If ListEx()\CanvasCursor <> #Cursor_Sort
If ListEx()\CanvasCursor = #PB_Cursor_LeftRight ; en cours de redimensionnement
col_Width = GetColumnWidth_(X)
If ((X >= ListEx()\Cols()\X - dpiX(2)) And (X <= ListEx()\Cols()\X)) Or
((X >= ListEx()\Cols()\X - col_Width) And (X <= ListEx()\Cols()\X - col_Width + dpiX(2)))
; No change, we keep left-right arrows
Else
ListEx()\CanvasCursor = #Cursor_Sort
SetGadgetAttribute(GNum, #PB_Canvas_Cursor, ListEx()\CanvasCursor)
EndIf
Else
ListEx()\CanvasCursor = #Cursor_Sort
SetGadgetAttribute(GNum, #PB_Canvas_Cursor, ListEx()\CanvasCursor)
EndIf
EndIf
Else
If ListEx()\CanvasCursor <> #Cursor_Default
If ListEx()\CanvasCursor = #PB_Cursor_LeftRight ; en cours de redimensionnement
col_Width = GetColumnWidth_(X)
If ((X >= ListEx()\Cols()\X - dpiX(2)) And (X <= ListEx()\Cols()\X)) Or
((X >= ListEx()\Cols()\X - col_Width) And (X <= ListEx()\Cols()\X - col_Width + dpiX(2)))
; No change, we keep left-right arrows
Else
ListEx()\CanvasCursor = #Cursor_Default
SetGadgetAttribute(GNum, #PB_Canvas_Cursor, ListEx()\CanvasCursor)
EndIf
Else
ListEx()\CanvasCursor = #Cursor_Default
SetGadgetAttribute(GNum, #PB_Canvas_Cursor, ListEx()\CanvasCursor)
EndIf
EndIf
Windows 10 Pro x64
PureBasic 6.20 x64
PureBasic 6.20 x64
- Thorsten1867
- Addict
- Posts: 1372
- Joined: Wed Aug 24, 2005 4:02 pm
- Location: Germany
Re: [Modules] ListEx (all OS / DPI)
Try it again!tatanas wrote:The cursor still flickers (changing from default to left/right) when hovering the column separator.

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)
Nice module, but is it possible to create lines with different colors?
I try to achieve something like this

but using ListEx::SetColor changes the color of all previous and future lines.
Thanks in advance
I try to achieve something like this

but using ListEx::SetColor changes the color of all previous and future lines.
Thanks in advance
