Scroll tglistbox to a given element


Simple question, but I don’t find the answer :
How to scroll a TGListBox to see a given element (specified by id for example) ?
I tried :
But it didn’t work.

Thank you,

Hi Barth,

AFAIK, there is no obvious solution for this… I’ll check if it is possible at all and let you know.

Cheers, Bertrand.

Hi Bertrand,

Ok thank you.


Well, I was too fast… Here is a possible solution (depending on what is selectedId):

((TGLBContainer *)fCombo->GetContainer())->SetVsbPosition(selectedId);If it doesn’t work, please post a simple running macro reproducing the problem.

Cheers, Bertrand.

It works like a charm !
Thank you very much.