To count the amount of each control type lazarus / 31-LCL ---------------------------------------------------------------------- asdf · 2010-10-25 11:46 In a form, there are lots of controls and various types. Please help finding the way to count for each type . Thank you. ---------------------------------------------------------------------- typo · 2010-10-25 11:52 Code: [Select]  for i := 0 to Application.ComponentCount - 1 do     if Application.Components[i] is TForm then       Showmessage(TForm(Application.Components[i]).Name); ---------------------------------------------------------------------- A.S. · 2010-10-25 12:44 Code: [Select]sl: TStringList; ... sl.Clear; for i := 0 to Components.Count - 1 do   sl.Values(Components[i].ClassName) :=     IntToStr(StrToIntDef(sl.Values(Components[i].ClassName), 0) + 1));