Error: Identifier not found "TPageControl"[solved] lazarus / 1-Linux ---------------------------------------------------------------------- OH1KH · 2024-11-11 14:16 Hi! Running Fedora 40 with Lazarus 3.6 (rev Unknown) FPC 3.2.2 x86_64-linux-gtk2 (from Fedora packet manager) I have routine to change form's  font (name/size). Recently  I added new block for TPageControl fomt change by just copying a previous block and change "TPageControl" to "TBitBtn" What is wrong with this that I can not see ? 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 procedure TdmUtils.LoadFontSettings(aForm: TForm);   ......  ......     if (aForm.Components[i] is TRadioButton) then    begin      (aForm.Components[i] as TRadioButton).Font.Name := fButtons;      (aForm.Components[i] as TRadioButton).Font.Size := fbSize    end;     if (aForm.Components[i] is TBitBtn) then    begin      (aForm.Components[i] as TBitBtn).Font.Name := fButtons;      (aForm.Components[i] as TBitBtn).Font.Size := fbSize    end;     if (aForm.Components[i] is TPageControl) then    begin      (aForm.Components[i] as TPageControl).Font.Name := fButtons;      (aForm.Components[i] as TPageControl).Font.Size := fbSize    end;   When compiled I get: dUtils.pas(2001,32) Error: Identifier not found "TPageControl" dUtils.pas(2003,31) Error: Identifier not found "TPageControl" dUtils.pas(2004,31) Error: Identifier not found "TPageControl" How ever I can select (from Object inspector) a component: pgPreferences:TPageControl and it has a property "Font" and subProperty "Size" or write: aForm.Components.TPageControl.Font.Size every time I write dot it offers the next one in list, so it must know what is TPageControl So from where comes:  Identifier not found "TPageControl" ???? --------- P.S. the idea was to change text in Tab sheet (header). If I replace  "TPageControl" with "TTabSheet" the result is same error:Error: Identifier not found  "TTabSheet" ---------------------------------------------------------------------- Bart · 2024-11-11 14:35 IIRC then TPageControl is defined in unit ComCtrls? So you need to add that to your uses clause. Bart ---------------------------------------------------------------------- MarkMLl · 2024-11-11 14:52 Quote from: Bart on November 11, 2024, 03:35:54 pmIIRC then TPageControl is defined in unit ComCtrls? So you need to add that to your uses clause. Give a man a fish... If you go to the documentation at https://lazarus- ccr.sourceforge.io/docs/ then to LCL and Index (top-left), you can find the entry for TPageControl and it tells you what unit it's in (top-right). MarkMLl ---------------------------------------------------------------------- OH1KH · 2024-11-11 16:04 Thanks for both! Just what I though, I did not see that (did not understand to look at uses clause)