zoukankan      html  css  js  c++  java
  • Delphi中Owner和Parent的区别[原]

    1个Form,里面有一个Panel,Panel里面有一个Button Button的Owner是Form,Parent是Panel TButton.Create的参数就是Owner,如果可视化的拖放控件,Owner自然是Form,但用代码Create,自然可以指定Panel是Owner。Owner是控件从属的关系,Owner.Free的时候,Owner的“随从”都会Free。 Parent是一种用于布局的关系,Button.Parent是Panel,所以Button的活动范围都会在Panel。如果Button的parent换成Form,Button的范围就是Form。
  • 相关阅读:
    排座椅
    关于math.h的问题
    客户调查
    排队打水
    删数游戏
    小数背包
    零件分组
    桐桐的组合
    桐桐的数学游戏
    桐桐的全排列
  • 原文地址:https://www.cnblogs.com/Byeah/p/3162462.html
Copyright © 2011-2022 走看看