Gtk Widget Library - adding assembly widgets to Toolbox for drag-n-drop on other project forms

pgregorypgregory USMember ✭✭
edited December 2016 in Visual Studio

I have several common Gtk widgets I want to put in a Gtk library and re-use in other projects.
I've created the Gtk library and the widgets.
I've added the new widgets to the Toolbox window using the right-click add items.
The custom widgets show up in the toolbox.
However, when I drag and drop them in a new project, I get a pop-up:

The widget "WidgetLib.AnalogClock" could not be found.

I've tried adding a reference to the library assembly dll to the project, but it still can't use the widget from the shared library.
What am I missing?

Posts

  • seijikunseijikun DEMember

    I am having the same problem.
    Have you found a solution for this yet?

  • pgregorypgregory USMember ✭✭

    In your project, load up some code in designer view.
    The toolbox will display.
    You will find a button next to the search box in the toolbox (looks like a circle with a plus in it).
    Click it to show widget controls to add.
    Click on the add assembly and find the library with the custom controls you want to add.
    Then click on the checkbox to add custom controls to the toolbox.

    You can also add the project to your existing project and add a reference to the library project in your main code.
    Then the custom widgets will show up in the toolbox.

  • jp0127lilyjp0127lily USMember ✭✭

    I am having the same problem.

Sign In or Register to comment.