本文整理匯總了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);
}
}