I can't get the numbers of page, of a TPageControl lazarus / 31-LCL ---------------------------------------------------------------------- BlueIcaro · 2011-10-16 12:26 Hello, my program, raises a SIGSEGV Exception, when Executes this lines Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  I := MyPageControl.PageCount; How can I get the number of Pages in a TPageControl? I use Lazarus 0.9.31, FPC 2.5.1 Thanks /BlueIcaro ---------------------------------------------------------------------- BlueIcaro · 2011-10-16 12:37 More info I tried to get the page number in a new program, and I get succelly. So I review the code of my program I my program I create the tabsheets dinamic with this code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  TabSheet := TTabSheet.Create (frEditor.Contenedor);   TabSheet.Name:= stNombre+IntToStr (nTabSheet);   TabSheet.PageControl := frEditor.Contenedor;   TabSheet.Caption := stNombre+Ext;   TabSheet.Tag:= nTabSheet;  I add this line: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    TabSheet.Parent := frEditor.Contenedor;             Any help? /BlueIcaro ---------------------------------------------------------------------- Blaazen · 2011-10-16 13:23 What is Code: [Select]Contenedor 1) Is it TPageControl ? and 2) Is it created ? ---------------------------------------------------------------------- BlueIcaro · 2011-10-16 14:52 Quote from: Blaazen on October 16, 2011, 03:23:27 pmWhat is Code: [Select]Contenedor 1) Is it TPageControl ? and 2) Is it created ? Yes, to all questions. Thanks Blaazen for the aswer, but a few minutes ago I found de solution. I have a mainform, which creates (in his oncreate event)  a second form, and a TPageControl, and in the TPageControl creates a TabSheet in this second form. So I found that I want to access to any property of the TPageControl, I have to do some thing like this: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   MainForm.SecondForm.PageControl1.AnyProperty;  /BlueIcaro