我在設置應用程序中加載文件時選項卡的可見性時遇到問題。 當用戶啓動應用程序時,它顯示歡迎標籤,我試圖做的是當用戶選擇文件 - >打開它在一個新的編輯器形式加載文件罰款,但我似乎無法弄清楚如何使其加載窗體並設置編輯器選項卡的可見性。C#WinForms:在新窗體加載選擇選項卡可見性
if (this.openEditorDialog.ShowDialog(this) == DialogResult.OK && editForm != null)
{
editForm.Close();
editForm = new EditorForm(this);
editForm.OpenFile(this.openEditorDialog.FileName);
editForm.Closing += new CancelEventHandler(EditorForm_Closing);
editForm.Show();
}
我試過在做editForm.EditorTab.Show();以及Activecontrol = editForm.EditorTab無濟於事。提前謝謝了。
很難猜測是什麼標籤在做什麼。當然,它應該由EditorForm本身在OpenFile()方法中進行控制? –