我需要重寫Tabcontrol GetTabRect。重寫C#.NET的幫助
protected override Rectangle GetTabRect(int index)
{...}
我收到此錯誤
錯誤1 'TabControl.GetTabRect(INT)': 當 中重寫 '公共' 繼承的成員 「不能改變訪問修飾符System.Windows.Forms.TabControl .GetTabRect(INT) '
Error2'TabControl.GetTabRect(INT)': 不能重寫繼承構件 'System.Windows.Forms.TabControl.GetTabRect(int)的' ,因爲它沒有標明虛擬,抽象 ,或覆蓋
我怎樣才能做到這一點?
編輯
如果我使用市民:
TabControl.GetTabRect(int)': cannot override inherited member 'System.Windows.Forms.TabControl.GetTabRect(int)' because it is not marked virtual, abstract, or override
該方法未標記爲「虛擬」,因此您無法覆蓋它(不管訪問修飾符) – BrokenGlass 2011-03-30 21:34:31
有一種方法? – Ste 2011-03-30 21:35:37
@Ste:這並不意味着被覆蓋 – BrokenGlass 2011-03-30 21:37:27