开发者论坛

 找回密码
 注册 (请使用非IE浏览器)
查看: 1917|回复: 1

小白问题_子类窗体继承基类时,没有显示控件

[复制链接]

0

精华

0

贡献

0

赞扬

帖子
8
软币
84
在线时间
5 小时
注册时间
2017-6-26
发表于 2017-7-5 13:27:49 | 显示全部楼层 |阅读模式
本帖最后由 依旧一生有你 于 2017-7-5 13:31 编辑

非常感谢~~
我的一个基类窗体,上面有些baritems,一个子类窗体继承,设计器都显示了,这些控件 ,怎么调试运行的时候没有显示,请问什么原因呢?

public EngMngForm()
        {
            InitializeComponent();
            CustomInitial();
        }
        /// <summary>
        /// 自定义初始化
        /// </summary>
        private void CustomInitial()
        {
            try
            {
                this.barItemQuery.Visibility = BarItemVisibility.Always;
                this.barItemSel.Visibility = BarItemVisibility.Always;
                this.barItemCancelSel.Visibility = BarItemVisibility.Always;
                this.barItemRel.Visibility = BarItemVisibility.Always;
                this.barItemEdit.Visibility = BarItemVisibility.Always;
                this.barItemSave.Visibility = BarItemVisibility.Always;
                this.barItemClose.Visibility = BarItemVisibility.Always;
                barItemRel.Caption = "提交";
                barItemEdit.Caption = "维护";
            }
            catch(Exception ex )
            {
                MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }





调试中

调试中

子类设计器

子类设计器

基类baritem

基类baritem
回复

使用道具 举报

0

精华

0

贡献

0

赞扬

帖子
8
软币
84
在线时间
5 小时
注册时间
2017-6-26
 楼主| 发表于 2017-7-5 13:31:06 | 显示全部楼层
求大家指教~~,
回复

使用道具 举报

Archiver|手机版|小黑屋|开发者网 ( 苏ICP备08004430号-2 )
版权所有:南京韵文教育信息咨询有限公司

GMT+8, 2024-4-26 08:04

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表