1.1. How to hide the "Main" tab?
Using the .NET Edition with standard WinForms controls, you may hide the tabs with the following code:
TabControl tc = (TabControl) queryBuilder1.Tabs.GetControl(); tc.ItemSize = new Size(1,1); tc.Top = tc.Top - tc.ItemSize.Height; tc.Height = tc.Height + tc.ItemSize.Height; tc.Region = new Region(new RectangleF(tc.TabPages.Left, tc.TabPages.Top, tc.TabPages.Width, tc.TabPages.Height + tc.ItemSize.Height));
Another way is to make a tab very wide and set its height to 1:
tc.Multiline = false;
tc.SizeMode = TabSizeMode.Fixed;
tc.ItemSize = new Size(2000, 1);
It works but not looking perfect. That's all we can do. Unfortunately the WinForms TabControl has no standard way to hide tabs.
Using the .NET Edition with DevExpress controls, use the following code:
XtraTabControl tc = (XtraTabControl) queryBuilder1.Tabs.GetControl(); tc.ShowTabHeader = DefaultBoolean.False;