从数据模块访问选项卡之一上的组件
也许微不足道,但似乎无法弄清楚...... 我正在使用 RAIZE 组件,即 rzPageControl1,我的一张工作表称为 PRO.It (rzPageControl1) 驻留在 Form1 上。 现在,我在该工作表上有一个 cxTextEdit4,我需要从中访问 新记录事件上的 Datamodule2.Tablename2。
但似乎无法正确访问它...
有人知道语法吗?
我试过 ; Form1.rzPageControl1。等但似乎无法让delphi列出我的组件 可用的.... 请帮忙...
Maybe trivial,but can't seem to figure it out....
I am using RAIZE components i.e rzPageControl1 and one of my sheets is called
PRO.It (rzPageControl1) resides on Form1.
Now,I have an cxTextEdit4 on that sheet which I need to access from
Datamodule2.Tablename2 on new record event.
But cant seem to access it properly...
Does anyone know the syntax ?
I tried ;
Form1.rzPageControl1. etc but cant seem to make delphi list me the components
available....
Please help ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
表单上的组件都位于表单本身名称下的顶级范围内,而不是页面控件的子组件属性。
您需要 Form1.Button1,而不是 Form1.rzPageControl1.Button1,即使 Button1 物理上放到了 rzPageControl1 上。
在delphi术语中,我们说按钮是表单
拥有
的,但它是页面控件上的选项卡PARENTED
的,这意味着它作为特定子的一部分出现。页在页控件上,但从内存的角度和范围的角度来看,它仍然属于(被拥有)表单。The components on the form are all in the top level scope under the name of the form itself, and are not sub-component properties of your page control.
You want Form1.Button1, not Form1.rzPageControl1.Button1, even if Button1 is physically dropped onto rzPageControl1.
In delphi terms we say that the Button is
OWNED
by the Form, but it isPARENTED
by a tab on the page control, meaning it appears as part of the particular sub-page on the page control, but it still belongs (is owned) from memory point of view, and a scope point of view, by the form.