Add Items metroTabControl

weirdo picture weirdo · May 29, 2015 · Viewed 8.3k times · Source

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

Answer

Hans Passant picture Hans Passant · May 29, 2015

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.