相关疑难解决方法(0)

控件的所有者和父级之间有什么区别?

我对Delphi VCL控件的两个属性有点好奇.

每个组件有2种性质OwnerParent在运行时.谁能帮助我理解两者之间的区别?它们如何被windows用于显示控件或表单?

delphi delphi-7

10
推荐指数
1
解决办法
3833
查看次数

如何分离面板并在单独的窗口中显示它?

假设我的表单A包含一个面板(其中包含许多其他控件)和一个表单B,它是空的.
我可以以编程方式从面板A中分离面板并将其移动到表单B(并可能返回到表单A)吗?

我知道我可以更改面板的所有者但是它可以在不同的表单之间工作吗?

更新:
在一些谷歌搜索后,我看到有一个ParentWindow属性.

delphi vcl

5
推荐指数
2
解决办法
3472
查看次数

如何在创建中设置TCustomControl的父级

When we create a component as a custom control and the control is dropped on a panel the control always appears on the form rather than the containing control. How do you set the parent of the custom control in Create so that when the button is dropped on panel the buttons parent is the panel?

TGlassButton = class(TCustomControl)
...
public
    { Public declarations }
    constructor Create(AOwner: TComponent); override;
...

constructor TGlassButton.Create(AOwner: TComponent);
  begin
    inherited;  ???????????
    inherited Create(AOwner); ????????????
    Parent …
Run Code Online (Sandbox Code Playgroud)

delphi

3
推荐指数
1
解决办法
3458
查看次数

标签 统计

delphi ×3

delphi-7 ×1

vcl ×1