Delphi access private function in VCL unit -


how access private function in vcl unit?

i need call function colortoprettyname extctrls.pas.

now copied source imo nicer use function instead.

some more details: function used in tcolorbox, need pretty name. tried instantiate tcolorbox , pretty name it, possible when have twincontrol assign parent. twincontrol don't have in place want use pretty name , don't want hacks.

you cannot readily call function outside unit since not exposed.

you create instance of control calls function, , persuade dirty work. that's feasible another answer demonstrates.

you use disassembler find address of function , call using procedural variable. madexcept source code great source of examples of technique.

on balance, copying source code is, in view, best option. of available options have drawbacks , seems simplest.


Comments