ListIconGadget- slow and lazy horizontal scrolling (Win)
ListIconGadget- slow and lazy horizontal scrolling (Win)
Why the horizontal scrolling of the ListIconGadget is so slow and lazy with Windows? It seems the header line moves even slower than the rest. Feels very unsatisfactory... the list is not huge. Twenty colums and 80 rows... It feels slower than Excel 5 für Windows 3.1 on my 486...
I have compiled the same code for Mac OS: Very fast ans smooth scrolling - very fast with 10000 lines too. What is wrong here?
I have compiled the same code for Mac OS: Very fast ans smooth scrolling - very fast with 10000 lines too. What is wrong here?
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
Here a simple code to test:
If I scroll horizontaly I get massive scrolling lags. It seems the table header moves slower then the values. Can anyone confirm that?
I use Windows 10 here. With Mac OS scrolling in booth directions is extremely smooth and fast.
Code: Select all
OpenWindow(0, 0, 0, 1200, 700, "ListIconGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 0, 0, 1200, 700, "Column 0", 120, #PB_ListIcon_FullRowSelect | #PB_ListIcon_GridLines)
For col = 1 To 30
AddGadgetColumn(0, col, "Column " + Str(col), 120)
Next col
For row = 0 To 120
AddGadgetItem(0, row, "")
For col = 0 To 30
SetGadgetItemText(0, row, "text entry (" + Str(col) + "," + Str(row) + ")", col)
Next col
Next row
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
I use Windows 10 here. With Mac OS scrolling in booth directions is extremely smooth and fast.
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
On my ancient Windows XP laptop, the headers and grid seem to scroll at the same rate.
I can't see any noticeable lag.
I can't see any noticeable lag.
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
Huge lag here on Win 7. Probably due to the custom draw techniques applied by Purebasic whilst the colors of each cell are looked up individually as they are painted etc.
Mind you, I just tried it with my EsGRID control which is based on a ListIcon and that uses similar custom draw and there is not as much lag. There was some however.
Mind you, I just tried it with my EsGRID control which is based on a ListIcon and that uses similar custom draw and there is not as much lag. There was some however.
I may look like a mule, but I'm not a complete ass.
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
yes, confirmed,Lebostein wrote:If I scroll horizontaly I get massive scrolling lags. It seems the table header moves slower then the values. Can anyone confirm that?
same here.Lebostein wrote:I use Windows 10 here.
Greetings ... Peter
Hygge
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
Very laggy on horizontal (but vertical) scrolling here, Win 10. I tried various API tricks but nothing fixed it.
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
I have just checked the above code on Win 7 64bit PB 5.70.
If I turn on Enable modern theme support in Compiler Options, there is a huge lag.
If Enable modern theme support is disabled, there is no lag.
If I turn on Enable modern theme support in Compiler Options, there is a huge lag.
If Enable modern theme support is disabled, there is no lag.
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
win 7 x64 pb 5.71 - same effect - with modern theme support it lags, without theme support its fluid. The task manager shows one core close to 100% if theme support is enabled.
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
Is this a problem of Windows or a glitch in PB?
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
I have tested Lebostein's code example on Windows 10 x64 v1809 with PB 5.71 x86 and x64. I can confirm the lagged horizontal scrolling of the header cells when modern theme support is enabled.
So in summary it's both a Windows problem (only caused in modern theme support) and a PureBasic problem. PureBasic doesn't exhibit the lagged display of the leftmost or rightmost columns of the C program but therefore introduces the lagged header cell scrolling...
I have converted Lebostein's code example to C and compiled it with Pelles C 9.00.9 for Windows to x86 and x64 executables. Without modern theme support the horizontal scrolling is smooth (like in PureBasic). With modern theme support enabled no lagged scrolling of the header cells occurs. But in contrast to the PureBasic version the C version shows a marked lag in displaying the rightmost colums when moving the scrollbar to the right and the same lag in displaying the leftmost colums when moving the scrollbar to the left.Lebostein wrote:Is this a problem of Windows or a glitch in PB?
So in summary it's both a Windows problem (only caused in modern theme support) and a PureBasic problem. PureBasic doesn't exhibit the lagged display of the leftmost or rightmost columns of the C program but therefore introduces the lagged header cell scrolling...
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
The lag & the slowness depends heavily on the View Port
Purebasic take small percentage and the rest by Windows
Disable XP Theme and check the API version
It looks much better
Purebasic take small percentage and the rest by Windows
Disable XP Theme and check the API version
It looks much better
Code: Select all
colinfo.LV_COLUMN
colinfo\mask = #LVCF_TEXT|#LVCF_WIDTH|#LVCF_FMT
colinfo\fmt = #LVCFMT_LEFT
colinfo\cx = 160
hwnd = OpenWindow(0,0,0,800,600, "API Listview",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
lv = CreateWindowEx_(#WS_EX_STATICEDGE, "SysListView32", "MyListView", #LVS_REPORT | #WS_CHILD | #WS_VISIBLE | #WS_HSCROLL | #WS_VSCROLL , 10,10,780,580,hwnd,0,0,0)
;SetWindowTheme_(lv, @"", @"")
For x = 0 To 30
header$= "Column Header "+Str(x)
colinfo\pszText = @header$
SendMessage_(lv, #LVM_INSERTCOLUMN, x, @colinfo)
Next
line.LV_ITEM
line\Mask = #LVIF_TEXT
For i=0 To 120
linetxt.s = "text entry "
line\iitem = i
line\pszText = @linetxt
SendMessage_(lv, #LVM_INSERTITEM, 0, @line)
For c = 1 To 30
col.LV_ITEM
coltext.s = "text entry " + Str(i) + " " +Str(c)
col\Mask = #LVIF_TEXT
col\iitem = i
col\iSubItem = c
col\pszText = @coltext
SendMessage_(lv, #LVM_SETITEM, 0, @col)
Next
Next
Egypt my love
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
With Mac OS it is sooo smoooth. No matter how many rows and columns.
that Windows scrolling lag gives me no peace...
that Windows scrolling lag gives me no peace...
Re: ListIconGadget- slow and lazy horizontal scrolling (Win)
Minimize lagging
Code: Select all
OpenWindow(0, 0, 0, 1200, 700, "ListIconGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ListIconGadget(0, 0, 0, 1200, 700, "Column 0", 120, #PB_ListIcon_GridLines)
SendMessage_(GadgetID(0), #LVM_SETEXTENDEDLISTVIEWSTYLE, #LVS_EX_DOUBLEBUFFER, 0)
For col = 1 To 30
AddGadgetColumn(0, col, "Column " + Str(col), 120)
Next col
For row = 0 To 120
AddGadgetItem(0, row, "")
For col = 0 To 30
SetGadgetItemText(0, row, "text entry (" + Str(col) + "," + Str(row) + ")", col)
Next col
Next row
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Egypt my love