本文整理汇总了C#中System.Windows.Forms.TabPage.GetTCITEM方法的典型用法代码示例。如果您正苦于以下问题:C# TabPage.GetTCITEM方法的具体用法?C# TabPage.GetTCITEM怎么用?C# TabPage.GetTCITEM使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TabPage
的用法示例。
在下文中一共展示了TabPage.GetTCITEM方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateTab
internal void UpdateTab(TabPage tabPage)
{
int index = this.FindTabPage(tabPage);
this.SetTabPage(index, tabPage, tabPage.GetTCITEM());
this.cachedDisplayRect = Rectangle.Empty;
this.UpdateTabSelection(false);
}
示例2: UpdateTab
/// <include file='doc\TabControl.uex' path='docs/doc[@for="TabControl.UpdateTab"]/*' />
/// <devdoc>
/// </devdoc>
/// <internalonly/>
internal void UpdateTab(TabPage tabPage) {
int index = FindTabPage(tabPage);
SetTabPage(index, tabPage, tabPage.GetTCITEM());
// It's possible that changes to this TabPage will change the DisplayRectangle of the
// TabControl (e.g. ASURT 99087), so invalidate and resize the size of this page.
//
cachedDisplayRect = Rectangle.Empty;
UpdateTabSelection(false);
}
示例3: InsertItem
private void InsertItem(int index, TabPage tabPage)
{
if ((index < 0) || ((this.tabPages != null) && (index > this.tabPageCount)))
{
throw new ArgumentOutOfRangeException("index", System.Windows.Forms.SR.GetString("InvalidArgument", new object[] { "index", index.ToString(CultureInfo.CurrentCulture) }));
}
if (tabPage == null)
{
throw new ArgumentNullException("tabPage");
}
if (base.IsHandleCreated)
{
System.Windows.Forms.NativeMethods.TCITEM_T tCITEM = tabPage.GetTCITEM();
int num = (int) System.Windows.Forms.UnsafeNativeMethods.SendMessage(new HandleRef(this, base.Handle), System.Windows.Forms.NativeMethods.TCM_INSERTITEM, index, tCITEM);
if (num >= 0)
{
this.Insert(num, tabPage);
}
}
}
示例4: InsertItem
/// <include file='doc\TabControl.uex' path='docs/doc[@for="TabControl.InsertItem"]/*' />
/// <devdoc>
/// This function is used by the Insert Logic to insert a tabPage in the current TabPage in the TabPageCollection.
/// </devdoc>
/// <internalonly/>
private void InsertItem(int index, TabPage tabPage) {
if (index < 0 || ((tabPages != null) && index > tabPageCount))
throw new ArgumentOutOfRangeException("index", SR.GetString(SR.InvalidArgument, "index", index.ToString(CultureInfo.CurrentCulture)));
if (tabPage == null)
throw new ArgumentNullException("tabPage");
int retIndex;
if (IsHandleCreated) {
NativeMethods.TCITEM_T tcitem = tabPage.GetTCITEM();
retIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, index, tcitem);
if (retIndex >= 0) Insert(retIndex, tabPage);
}
}