基本形式控件在派生形式中不可见 [英] base-form controls not visible in derived form

查看:68
本文介绍了基本形式控件在派生形式中不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



基本形式frmBase有datagridview,保存按钮,ok按钮,取消按钮

派生形式frmApp添加一个新按钮

所有frmBase - 控件都将修饰符设置为受保护

everythings ok

因为datagridview从frmApp变为frmApp(现在只有一个,但会有更多)我把frmBase控件放在面板上。因此,更容易(我认为)

来调整frmBase的大小。

然而在运行frmApp时,frmBase的按钮是不可见的,只有

派生形式的按钮。

这里缺少任何建议

提前感谢


base form frmBase has datagridview, save-button, ok-button, cancel-button
derived form frmApp adds a new button
all frmBase - controls have modifier set to protected
everythings ok
since datagridview varies from frmApp to frmApp (right now there's only one, but there'll be more) i put the frmBase-controls on a panel. thus it's easier (i think)
to resize frmBase.
however with this when running frmApp, the buttons of frmBase are not visible, only
the derived form's button.
any suggestions waht's missing here
thanks in advance

推荐答案

这不是'我们可以直接解决的任何问题 - 我们需要查看您的代码来执行此操作,我们无法从此处访问您的硬盘! :笑:



所以...一些初学者的想法。



首先检查一下面板 - 在派生表单的显示范围内是否可见?



派生的表单代码是否可以访问面板?



您是否已将基础表单放在不同的程序集中而忘记构建它?



您是否创建了基本表单的实例并查看了所有对此进行控制?
This isn't anything we can directly solve - we would need to look at your code to do that and we can't access your HDD from here! :laugh:

So...some starter idea.

Start by checking the location of the panel - is it visible within the display confines of the derived form?

Can the derived form code access the panel?

Have you put the base form in a different assembly and forgotten to build it?

Have you created an instance of the base form and seen all your controls on that?


这篇关于基本形式控件在派生形式中不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆