Remove and Replace a visual component at runtime

前端 未结 3 1158
隐瞒了意图╮
隐瞒了意图╮ 2020-12-31 21:17

Is it possible to, for instance, replace and free a TEdit with a subclassed component instantiated (conditionally) at runtime? If so, how and when it should be done? I\'ve t

3条回答
  •  萌比男神i
    2020-12-31 21:35

    You can actually use RTTI (look in the TypInfo unit) to clone all the matching properties. I wrote code for this a while back, but I can't find it now. I'll keep looking.

提交回复
热议问题