I created a TextBoxControl which is inherited from Infragistics.Win.UltraWinEditors.UltraTextEditor, an Infragistics control. As showed below.
public class TextBoxControl : Infragistics.Win.UltraWinEditors.UltraTextEditor
{
//My Stuff
开发者_JAVA技巧}
At some level Infragistics.Win.UltraWinEditors.UltraTextEditor class also inherited from WinForm's "Control" class. My problem is, this control is not appearing in the ToolBox. I done two steps 1. Choose from browse option and select the dll where the class present 2. Drag and drop the dll directly to the ToolBox
In-fact both are same, TextBoxControl control is not appearing in the ToolBox, what i missing here.
Edit : TextBoxControl class have empty constructor, nothing special in this class.
That should work:
- Right click on any ToolBox item (eg. Pointer)
- Select Choose items
- Click on Browse and select the .dll
- It will automatically select all controls imported from that .dll
- Just drag & drop the control your TextBoxControl to your form.
Important: Those controls will be added to the specified tab under ToolBox. Eg:
If you are under Containers, then those controls will be added to that Tab.
You could create a new tab to store those controls (if you have more than one or two), or just add it to Common Controls.
If you drag & drop a control to your form, you will see that the dll is referenced in your project.
If this code is part of your project then the control should automatically appear in the toolbox after you compiled the code. But it is an option that might have been turned off. Tools + Options, Windows Forms Designer, General, Toolbox, AutoToolboxPopulate must be True.
If it is a separate assembly then Drag+Drop won't work. Right click the toolbox, Choose Items, use the Browse tab.
精彩评论