(This is probably a dumb question AND a WTF combined, but here goes nothing)
I want to ‘draw’ lines or areas in my interface – typically separators inside a TableLayoutPanel. Currently what I do is just dump a Panel in the row and set it to Dock=Fill and give it the background required colour.
Just before doing the same thing, I wondered if another control (Label?) might be more lightweight. Or maybe I should just roll my own by inheriting from Control?
Any other solutions?
I would inherit from
Controland create your own as all other controls includingLabelandPaneldirectly or indirectly inherit fromControl. This also allows you to encapsulate the functionality separate from the others.I also think you could also override the
Paintevent for yourTableLayoutPanel, or inherit from this, make it your own and draw the lines.