I have a tab control and need to remove the dotted focus rectangle around the selected tab.
I have set the TabStop property of the TabControl to false. However if I click on a tab and press the Tab
key, the dotted rectangle appears around the tabname.
I have tried creating my own TabControl
and tried this
class MyTabControl : TabControl
{
public MyTabControl()
{
TabStop = false;
DrawMode = TabDrawMode.OwnerDrawFixed;
DrawItem += new DrawItemEventHandler(DoMoreTabControl_DrawItem);
Invalidate();
}
}
However, the dotted rectangle still appears.
I also tried overriding the MyTabControl.OnPaint()
method but it doesn't help.
Is there any way to achieve this?