ListBox typing slow

Hello XOJOers,

Since we’ve updated to the latest Framework version (We’ve run on 2015r3.1 for a long time) we have a terrible time in ListBox Textfields. Typing is only visible after the user stops typing for somewhile and is still terribly slow that it’s not really that useable. Now we have a very big problem: we can’t revert to an old version anymore! But this is not useable.

Our Custom ListBox is the same as the basic ListBox, except for the following in the CellClick EventHandler.

me.ColumnTypeAt(0) = ListBox.CellTypes.TextArea me.ColumnTypeAt(1) = ListBox.CellTypes.TextArea me.ColumnTypeAt(2) = ListBox.CellTypes.TextArea me.ColumnTypeAt(3) = ListBox.CellTypes.TextArea me.ColumnTypeAt(4) = ListBox.CellTypes.TextArea me.ColumnTypeAt(5) = ListBox.CellTypes.TextArea

Is there anything that can make this way slower with this update?

Greetings,

If this on MS-Windows it is probably because Xojo is now using Direct2D rather than GDI / GDI+

It could be that something else on the window constantly redrawing which is causing the slow down.

If you can, it might be worthwhile trying your listbox in a new standalone project to see if the problem still occurs. If it doesn’t then it is probably something else on the window causing the problem.

[quote=498054:@Kevin Gale]If this on MS-Windows it is probably because Xojo is now using Direct2D rather than GDI / GDI+

It could be that something else on the window constantly redrawing which is causing the slow down.

If you can, it might be worthwhile trying your listbox in a new standalone project to see if the problem still occurs. If it doesn’t then it is probably something else on the window causing the problem.[/quote]

Hey!

What kind of things are causing a listbox to redraw?

How many Rows / Columns / Number of characters by Row ?

i wonder why are you changing the ColumnType again and again in this CellClick event.
would not doing it once enough?

if you switching between maybe is only CellTypeAt better.

@Markus Rauch is correct. Unless you need to change the Column type, setting the column types should really be done once, in the ListBox’s Open event, not in the CellClick event.

I’ve updated it to the open event. It does nothing about the heavy input lag, but I’m always looking for improvements on how to make it better.

Does every key input makes the complete listbox redraw?

Do you have any kind of processing going on in any of the Cell-oriented events or in the KeyDown or KeyUp event?

I assume that you are calling the listbox’s EditCell (or EditCellAt) method to enable editing in the cell. Where are you calling it from and what is the code doing immediately after the call?