Speedup ListIconGadget AddgadgetItem

Just starting out? Need help? Post your questions and find answers here.
Dirk Geppert
Posts: 330
Joined: Fri Sep 22, 2017 7:02 am

Speedup ListIconGadget AddgadgetItem

Post by Dirk Geppert »

In some cases, filling a ListIconGadget is a little slow. The following code is fast enough - in this case, so it's not a good representation of my speed problem.

But I would like to know: is this the fastest way to fill a ListIconGadget or are there some nice workarounds?

Code: Select all

OpenWindow(0, 0, 0, 0, 0, "", #PB_Window_Background)
ListIconGadget(0, 0, 0, WindowWidth(0), WindowHeight(0), "Nr", 100, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection )
AddGadgetColumn(0, 1, "Name", 200)
AddGadgetColumn(0, 2, "Adress", 200)
AddGadgetColumn(0, 3, "Phone", 200)

For i = 1 To 600
  AddGadgetItem(0, -1, Str(i) + #LF$ + "Mustermann, Max" + #LF$ + "City, Street Number" + #LF$ + "12345678")
Next
bmld76
Posts: 27
Joined: Wed May 24, 2023 5:10 pm

Re: Speedup ListIconGadget AddgadgetItem

Post by bmld76 »

It is what I do, and it is enough fast for me.
Post Reply