public Panel AddTab(string title) { var tab = _header.AddTab(title); tab.OnSelect += TabOnSelect; var panel = new Panel(Id + "_panel", ((Widget)this).Width, ((Widget)this).Height - _tabHeaderHeight) { Y = _tabHeaderHeight, IgnoreInput = true, CanHaveInputFocus = false }; Add(panel); _tabPanels.Add(panel); Gui.SetVisible(panel, _tabPanels.Count == 1); return(panel); }