With edit the TabControl in C #?

0

I want to hide only the part of TabControl that comes with the name of the tab in C #, as shown below.

Is it possible?

    
asked by anonymous 24.03.2017 / 11:11

2 answers

3

If you do not want the tabs to appear, you are most likely using the wrong component.

The TabControl serves exactly to make tabs available.

Instead of TabControl , consider using Panel . You can find the documentation for class Panel here .

    
24.03.2017 / 12:28
1

The easiest way, and what can be done by the control's properties is as follows:

tabControl1.Appearance = TabAppearance.FlatButtons;
tabControl1.ItemSize = new Size(0, 1);
tabControl1.SizeMode = TabSizeMode.Fixed;

If this does not resolve your issue then you will have to create a custom control. Add a class to your project with the following code:

using System;
using System.Windows.Forms;

public class TablessControl : TabControl {
  protected override void WndProc(ref Message m) {
    if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;
    else base.WndProc(ref m);
  }
}

Compile the project. A new control should appear at the top of the toolbar. Drag it to the screen and use it normally as the default TabControl. When running the application the tabs will not be created

    
24.03.2017 / 12:05