本文整理汇总了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));
}
示例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));
}