Custom User Controls RRS feed

  • Question

  • I have a Custom User control defined in a dll which I add to the References in a C# Forms application.
    I then add a tab to the Toolbox and drag the custom control onto the Toolbox.
    My question is: why is it greyed out (is "grayed" the US spelling?)?

    I can add the control manually by editing the form.cs directly and it appears, but irritatingly I can't just drag and drop it.
    What am I doing wrong?
    Tuesday, July 29, 2008 5:08 PM


  • To get the controls appearing in the textbox you have to right-click in the toolbox, select choose items, navigate to the dll containing your custom controls. Any custom controls in the dll appear in the list now, and you can select these. These will then appear in the toolbox and you can drag them onto your form.
    I don't know why you can drag them directly from an object browser onto the toolbox if they are not subsequently available (they have the prefix "text").
    • Edited by ZiggyShort Tuesday, July 29, 2008 5:42 PM typo
    • Marked as answer by ZiggyShort Tuesday, July 29, 2008 5:42 PM
    Tuesday, July 29, 2008 5:41 PM