How do I add a Control to a Container in an inherited WinForm

后端 未结 1 995
逝去的感伤
逝去的感伤 2021-01-14 00:37

I have a base form in another project that enforces the same look & feel to all our WinForms programs. I inherited from that BaseForm, to create my own template, BaseVie

1条回答
  •  离开以前
    2021-01-14 01:22

    This MSDN article gave me the answer.

    "Not all controls support visual inheritance from a base form. The following controls do not support the scenario described in this walkthrough: WebBrowser, ToolStrip, ToolStripPanel, TableLayoutPanel, FlowLayoutPanel, DataGridView. These controls in the inherited form are always read-only regardless of the modifiers you use (private, protected, or public)."

    I used a docked Panel and a SplitContainer instead of a TLP, and now I can drop anything I want into them.

    0 讨论(0)
提交回复
热议问题