TPageControl OnChange lazarus / 31-LCL ---------------------------------------------------------------------- fakusz · 2011-05-26 08:09 hello I have Lazarus 0.9.30 under Windows 7 my program crashed that worked fine with Lazarus 0.9.28 the problem is, that I have a PageControl on a form and is attached a method to the OnChange event in this event I call a procedure that enumerates the tab's child controls (TWinControl.ControlCount, TWinControl.Controls[]) the program is crashing at this point, because the OnChange event on the PageControl is executed before the form's OnCreate I put a flag onto the form, that becomes true after the form's OnCreate and I check the value of this flag in the PageControl's OnChange so now the program is working, but I think this is not normal regards, fakusz ---------------------------------------------------------------------- Blaazen · 2011-05-26 11:04 Quotebecause the OnChange event on the PageControl is executed before the form's OnCreateAre you sure of this ? I seems it is a bug. ---------------------------------------------------------------------- zeljko · 2011-05-26 20:03 Quote from: Blaazen on May 26, 2011, 01:04:53 pmAre you sure of this ? I seems it is a bug. hm...now I'm wondering how it's possible that OnChage of TPageControl is executed before form is created ...