本文整理汇总了C#中System.Windows.Forms.StatusBarPanel.SetParent方法的典型用法代码示例。如果您正苦于以下问题:C# StatusBarPanel.SetParent方法的具体用法?C# StatusBarPanel.SetParent怎么用?C# StatusBarPanel.SetParent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.StatusBarPanel
的用法示例。
在下文中一共展示了StatusBarPanel.SetParent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Insert
public virtual void Insert (int index, StatusBarPanel value) {
if (value == null)
throw new ArgumentNullException ("value");
if (index > Count)
throw new ArgumentOutOfRangeException ("index");
// TODO: InvalidArgumentException for bad AutoSize values
// although it seems impossible to set it to a bad value
value.SetParent (owner);
panels.Insert(index, value);
owner.Refresh ();
// UIA Framework Event: Panel Added
OnUIACollectionChanged (new CollectionChangeEventArgs (CollectionChangeAction.Add, index));
}
示例2: AddInternal
private int AddInternal (StatusBarPanel p, bool refresh) {
if (p == null)
throw new ArgumentNullException ("value");
p.SetParent (owner);
int res = panels.Add (p);
if (refresh) {
owner.CalcPanelSizes ();
owner.Refresh ();
}
// UIA Framework Event: Panel Added
OnUIACollectionChanged (new CollectionChangeEventArgs (CollectionChangeAction.Add, res));
return res;
}