[SOLVED] Is passing an LCL component to a procedure possible? lazarus / 31-LCL ---------------------------------------------------------------------- JCobb · 2018-03-29 08:46 Hey all! I would like to write a procedure that will change specific properties to any LCL component I pass to it (i.e. forms, buttons, labels, textboxes, etc.)... I haven't been able to find any reference that talks about this. Does anyone know a simple example of such a process? Thanks in advance! Jeff ---------------------------------------------------------------------- Thaddy · 2018-03-29 10:50 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 ChangeColorToBlack(const acomponent:Tcomponent);begin   if acomponent is TButton then with aComponent as TButton do Font.Color := clBlack;  // and probably:  application.processmessages;end;Or something along those lines. See e.g. http://free-pascal- lazarus.989080.n3.nabble.com/Lazarus-how-about-a-quot-HasProperty- quot-property-td4035233.html As long as you test for the property acually exists.... ---------------------------------------------------------------------- balazsszekely · 2018-03-29 11:47 Go to ($LazarusDir)/examples/objectinspector, then open oiexemple.lpr.