Home > front end >  Adding external Folder from another Project
Adding external Folder from another Project

Time:11-21

I am probably facing a basic problem. I would like to create TimePickers as in this project link: enter image description here

And I can see that Timepicker inside my toolbox.

enter image description here

But when I try to drag it to my panel I am facing with this error.

enter image description here

CodePudding user response:

To explain this process more clearly:

Just paste the enter image description here

Edit Opulos/Core/UI/TimePicker.cs

enter image description here

Add the below codes:

public TimePicker() :this(3, true, true, true, true) {

}

enter image description here

Then rebuild the program, you could find it in the toolbox.

enter image description here

Output:

enter image description here

Thanks to jimi's explanation:

Pass default values or configure it to generate a different pre-defined behavior when the class is created via ToolBox.

Keep in mind that those classes are not built with the ToolBox in mind (no reference to ToolBox behavior is specified anywhere), it looks like all are meant to be instantiated in code.

I.e., you may have the same problem somewhere else.

You should know what to do (though decorating the public Control classes with appropriate [ToolboxItem], [ToolboxBitmap] etc. stuff should be considered)

CodePudding user response:

If you are trying to drag another folder into your solution folder, then you can use the default windows file explorer. If you want to import a library from another project, simply right click Dependencies->add project reference, browse, and select the library. In general, you should avoid copying the code itself, and instead add a reference to the output.

Hope I could help, if I misunderstood your question I apologize!

  • Related