Page 33 of 33

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

Posted: Tue Nov 12, 2024 5:24 pm
by ThoPie
Hallo zusammen,
ich benötige bitte eure Hilfe.
Ich möchte bei einem langen ListEx-Gadget auf das letzte Element scrollen und diese Zeile markieren. Ein einfaches ListEx::SetState(ListEx::CountItems()) reicht ja nicht.
Vielen Dank für eure Hilfe.

English translation by DeepL (Kiffi)

Hello everyone,
I need your help please.
I want to scroll to the last item in a long ListEx gadget and select this row. A simple ListEx::SetState(ListEx::CountItems()) is not enough.
Thank you very much for your help.

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

Posted: Tue Nov 12, 2024 10:11 pm
by jacdelad
Count items - 1 ? Die Zahlung beginnt doch bei 0.

Außerdem bist du hier im englischen Forum. :mrgreen:

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

Posted: Sun Jul 13, 2025 1:49 pm
by matlab2
Hello everyone,
after switching from PB6.20 to PB 6.21 I get a memory violation error when scrolling horizontally in ListEx (version from 22.6.2022).
If you start the example in the module and scroll, the memory violation occurs in line 4886.
Question: Is there already a solution?

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

Posted: Sun Jul 13, 2025 5:40 pm
by jacdelad
Confirmed bug in 6.21: viewtopic.php?t=87121

Insert this right after "Module ListEx" in ListExModule.pbi (line 531 or such):

Code: Select all

CompilerIf #PB_Compiler_OS = #PB_OS_Windows And #PB_Compiler_Version = 621
  Debug "FIX"
  Procedure.d _FixDrawText(x.d, y.d, Text$, FrontColor=-1, BackColor=-1)
    Protected r1.d, dx.d
    Debug "DT"
    dx = TextWidth(Text$)
    If x + dx <= 0.0
      ;Debug "No DrawText"
      Debug "NO"
      ProcedureReturn x + dx
    EndIf
    If FrontColor <> -1
      If BackColor <> -1
        r1 = DrawText(x, y, Text$, FrontColor, BackColor)
      Else
        r1 = DrawText(x, y, Text$, FrontColor)
      EndIf
    Else
      r1 = DrawText(x, y, Text$)
    EndIf
    ProcedureReturn r1
  EndProcedure
  
  Macro DrawText(x, y, Text, FrontColor=-1, BackColor=-1)
    _FixDrawText(x, y, Text, FrontColor, BackColor)
  EndMacro
CompilerEndIf

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

Posted: Fri Jul 18, 2025 12:49 pm
by matlab2
Thanks for the quick workaround!

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

Posted: Fri Jul 18, 2025 1:35 pm
by jacdelad
All kudos go to mk-soft (see linked thread).