当前位置: 首页>>代码示例>>C#>>正文


C# IControlFactory.CreateGroupBox方法代码示例

本文整理汇总了C#中IControlFactory.CreateGroupBox方法的典型用法代码示例。如果您正苦于以下问题:C# IControlFactory.CreateGroupBox方法的具体用法?C# IControlFactory.CreateGroupBox怎么用?C# IControlFactory.CreateGroupBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IControlFactory的用法示例。


在下文中一共展示了IControlFactory.CreateGroupBox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FilterControlVWG

        ///<summary>
        ///</summary>
        ///<param name="controlFactory"></param>
        public FilterControlVWG(IControlFactory controlFactory)
        {

            this.Height = 50;
            _controlFactory = controlFactory;
            _groupBox = _controlFactory.CreateGroupBox();
            //_groupBox.Anchor = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
            //_groupBox.Top = 0;
            //_groupBox.Left = 0;
            //_groupBox.Width = this.Width;
            //_groupBox.Height = this.Height;
            //this.Controls.Add((Control) _groupBox);
            _controlFactory.CreateBorderLayoutManager(this).AddControl(_groupBox, BorderLayoutManager.Position.Centre);
            _groupBox.Text = "Filter the Grid";

            BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(_groupBox);
            layoutManager.BorderSize = 20;
            IPanel filterButtonPanel = controlFactory.CreatePanel();
            filterButtonPanel.Height = 50;
            filterButtonPanel.Width = 110;
            CreateFilterButtons(filterButtonPanel);

            layoutManager.AddControl(filterButtonPanel, BorderLayoutManager.Position.West);

            _filterPanel = controlFactory.CreatePanel();
            _filterPanel.Width = this.Width;

            layoutManager.AddControl(_filterPanel, BorderLayoutManager.Position.Centre);
            _filterControlManager = new FilterControlManager(controlFactory, new FlowLayoutManager(_filterPanel, controlFactory));
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:33,代码来源:FilterControlVWG.cs

示例2: FilterControlWin

        ///<summary>
        /// Constructor for <see cref="FilterControlWin"/>
        ///</summary>
        ///<param name="controlFactory"></param>
        public FilterControlWin(IControlFactory controlFactory)
        {
            Height = 50;
            _controlFactory = controlFactory;
            FilterGroupBox = _controlFactory.CreateGroupBox();
//            _groupBox = _controlFactory.CreatePanel();
            _controlFactory.CreateBorderLayoutManager(this).AddControl(FilterGroupBox, BorderLayoutManager.Position.Centre);
            FilterGroupBox.Text = "Filter the Grid";
            BorderLayoutManager layoutManager = controlFactory.CreateBorderLayoutManager(FilterGroupBox);
            layoutManager.BorderSize = 20;
            _filterButtonPanel = controlFactory.CreatePanel();
            _filterButtonPanel.Height = 50;
            _filterButtonPanel.Width = 120;   //110;
            _filterButtonPanel.Visible = false;
            CreateFilterButtons(_filterButtonPanel);

            _controlPanel = controlFactory.CreatePanel();
            _controlPanel.Width = Width;

            this.EnsureButtonsFit();
            this._filterButtonPanel.Resize += (sender, e) => { this.EnsureButtonsFit(); };

            layoutManager.AddControl(_controlPanel, BorderLayoutManager.Position.Centre);
            layoutManager.AddControl(_filterButtonPanel, BorderLayoutManager.Position.East);


            Height = 50;
            this._controlPanel.Resize += (sender, e) =>
                {
                    this.Height = this._controlPanel.Height + layoutManager.BorderSize;
                    if ((this.FilterGroupBox.Height - layoutManager.BorderSize) < this.Height)
                    {
                        this.FilterGroupBox.Height = this.Height;
                    }
                };
            _filterControlManager = new FilterControlManager(controlFactory,
                                                             new FlowLayoutManager(_controlPanel, controlFactory));
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:42,代码来源:FilterControlWin.cs


注:本文中的IControlFactory.CreateGroupBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。