Listbox event sequence

Can somebody tell me the event firing sequence following an EditCell(row, column) action.

Reading the LR I assume that CellAction is the next event but I don’t think that is true. I think that there is a CellBackgroundPaint, followed by a CelltextPaint pro to the CellAction event.

Any help would be greatly appreciated.

Simon.

I know you already know the mantra - Dont depend on event order

Beyond a minimal set (all controls open events happen before window open, app open happens before others ) you really should not rely on a specific order

what is it you’re trying to do that you want the event order ?

I am attempting to find the right place to set the Listindex.

In my MagicListbox I have an issue. If I edit a string column I want to take the new text and sort the listbox on this column. Following that I would like the listbox item to be highlighted. The sort runs fine and I get a new listbox list. I then iterate through the listbox to find the new text and set the listindex to that row.

The result is I get two highlighted rows - the original row position and the new row position. If I take the focus away from the window the errant highlight disappears!

So I am looking to determine where I should deselect the Listbox.Selected boolean value.

CellAction would be a good spot

OR you could, on edit cell, hook the active cells event handlers and then you have access to keydown etc for it BUT thats probably overkill

Hmm, CellAction is where I have tried but it still left the old highlight on.

Will try some other things tomorrow.