[Lazarus] Filling ListBox without triggering OnSelectionChange

Marc Santhoff M.Santhoff at web.de
Thu Jan 8 02:04:40 CET 2015


On Mi, 2015-01-07 at 09:32 +0000, Howard Page-Clark wrote:
> On 07/01/2015 06:49, Marc Santhoff wrote:
> > Hi,
> >
> > it has been a very long time since I've programmed GUIs. I have
> > forgotten how to fill a ListBox without having the event handler
> > OnSelectionChange executed.
> > How can it be done?
> 
> ListBox1.Items.Assign(someStringlist);
> 
> does not trigger the OnSelectionChange event.

Well, for me it does. Using Lazarus 1.2.0 and fpc 2.6.2, that is. Maybe
there has been a change in a later version of LCL?

No, from what I've seen right now the form creation sequence does it at
a later time.

Thanks for pointing out.

-- 
Marc Santhoff <M.Santhoff at web.de>







More information about the Lazarus mailing list