Search code examples
c#tabcontrolmetro-ui-css

Add Items metroTabControl


Can anyone tell me how to add items/controls to a metroTabControl (windows forms)? Whenever I try to do so with visual studio 2013 designer, it throws this error:

Cannot add 'MetroLabel' to TabControl. Only TabPages can be directly added to TabControls


Solution

  • The .NET TabControl has a pretty fancy designer, they did not provide a very good substitute for it. Understandably, creating designers is a lot of work and designer code is quite obscure.

    Select the MetroTabControl you added, note the little black triangle that's displayed on the upper-right. Click it and select Add Tab. You can now drop the label on the added tab page.