@ertank
Once again.
I tested your code but in different environment: Laz. 1.8.0, FPC 3.0.4, win32, LCL widgetset, optimization level=0 and enabled debug info. It works for me.
My amendments are not needed as its goal was achived in unit2.
Problem is not in the application but is widgetset specific.
WooBean