0

I want to use buttons as tabs without the tabcontrol, I thought about using panels but its hard to do in designer. Is there anything I could use as an alternative to tabcontrol? I used

tabControl1.SelectedIndex = 0;

and dragged a panel on top of it and below to hide the padding but that is really messy too, isn't there a simpler way of doing this, since so many c# programs have custom tabs? Here is what I currently have : https://i.stack.imgur.com/NpWlY.jpg I managed to remove the headers but the padding still looks pretty bad https://i.stack.imgur.com/uw5jx.jpg

daaax issa
  • 57
  • 2
  • 9
  • Unless this is an assignment of some form, I question reinventing the wheel. The .NET `TabControl` is fairly straight forward. If you are having a difficult time using a `TabControl`, then rolling your own isn’t going to be any easier. – JohnG May 02 '19 at 03:01
  • I suggest you learn how to use the `TabControl` first. Try something and if it doesn’t work, then “that” may be a better question than this one. In addition, as you stated, there are plenty of third-party libraries that have “custom” tabs, there is nothing preventing you from using those, other than cost or functionality. I am confident that they will not be that much easier to use than the .NET `TabControl`. – JohnG May 02 '19 at 03:01
  • I tried using tabcontrol and removed the headers using https://stackoverflow.com/questions/10316567/how-do-i-create-a-tab-control-with-no-tab-header-in-windows-form However, I can't seem to remove the padding, I looked at two threads at stackoverflow, neither of which worked. – daaax issa May 02 '19 at 03:08
  • Unfortunately, without knowing what you are trying to do and a clear picture of the problem, speculation may be all you get. I suggest creating a minimal, complete and verifiable example [MCVE](https://stackoverflow.com/help/mcve). This process will often reveal the problem you are having. Again, without something to go by, any answer would be a guess. – JohnG May 02 '19 at 03:22
  • Updated with screenshots, sorry for the lack of detail. – daaax issa May 02 '19 at 03:31
  • Not sure how those pictures help. In addition, it is difficult to understand what are you trying to do and what is not working as expected. The pictures show a tab control with headers and without. (guessing) “How” this was done is a mystery since there is no code to reproduce the problem. Please create an MCVE (see my previous comment) to help others understand what the problem is and what the goal is. – JohnG May 02 '19 at 03:47

0 Answers0