Add Tabset |
[Top] [Chapter] [Previous] [Next] |
Now, the icing - add a tabset to switch between documents.
We only need to add the EditorGUI.wpguiPanelH2 flag
wpdllInt1.SetEditorMode( ... EditorGUI.wpguiPanelH1 | EditorGUI.wpguiPanelH2, EditorGUI.wpguiDontSet);
and an event handler which handles the click on the tabset buttons (typ=9). It simply takes the name of the button and uses it to select the text.
private void wpdllInt1_OnButtonClick(object Sender, int Editor, WPDynamic.IWPDllButton Def) { if(Def.Typ==9) { string s = Def.Name; for(int i=0;i<WindowMenu.MenuItems.Count;i++) if(((TagMenuItem)WindowMenu.MenuItems[i]).RTFID.CompareTo(s)==0) { TagMenuItem_Click(WindowMenu.MenuItems[i],null); break; } } } |