Recent

Author Topic: Extract a designed component into something reusable?  (Read 177 times)

randohinn

  • New Member
  • *
  • Posts: 13
Extract a designed component into something reusable?
« on: August 06, 2020, 07:35:24 pm »
Hey

I have a TPanel with it's childs in a form. I'd now like to use this panel with it's children again, creating new instances at runtime. Is there a way to turn that panel into something reusable, like an entire separate component? Creating a new TPanel and using Assign doesn't wprk, because my panel has a TComboBox in it. And the memorystream read-write solution causes a name conflict for the panel which I can't seem to be able to solve. Any ideas?

GetMem

  • Hero Member
  • *****
  • Posts: 3757
Re: Extract a designed component into something reusable?
« Reply #1 on: August 06, 2020, 07:42:20 pm »
Use a TFrame, you can create it dynamically on runtime. Please do a forum search, you will find many examples.

 

TinyPortal © 2005-2018