Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I "hide" controls that my control uses from the toolbox?

I have developed a control in C#. Among other things this control can popup other controls at runtime. When you include the assembly in Visual Studio, the control that I created shows up, but the other controls (the ones my control uses) show up as well. I would rather not have them show up in the toolbox in Visual Studio. Is there an Attribute that I can apply to these classes to make them not show up? I found the browsable attribute, but it says it is for properties and events.

like image 535
Pat O Avatar asked Sep 15 '09 01:09

Pat O


People also ask

How do I add controls to my Visual Studio Toolbox?

Right-click anywhere on the toolbox and select "Choose Items… ​" to open the Choose Toolbox Items dialog box. Scroll through the list, and select the check boxes corresponding to the Ultimate UI for Windows Forms controls and components that you want to add to the toolbox. Click OK.

How do I display my Toolbox?

The Toolbox window displays controls that you can add to Visual Studio projects. To open Toolbox, choose View > Toolbox from the menu bar, or press Ctrl+Alt+X. You can drag and drop different controls onto the surface of the designer you are using, and resize and position the controls.

How do I unhide a Toolbox in Visual Studio?

To add custom controls to Visual Studio, create a new project (ASP.NET Web Forms, WPF, or WinForms) and open the designer. The toolbox items will only be visible in the designer window. If the toolbox is not visible, click the View menu, and then select the Toolbox option.

What is Toolbox in MS Word?

Jumsoft's Toolbox for MS Word is the ultimate companion for your Microsoft Word projects. Thousands of customizable items and millions of ways to combine them: everything from fully designed templates, to stunning infographics, to the smallest document details like clipart and bullets.


1 Answers

Add the [ToolboxItem(false)] attribute to the classes that you don't want to show up in the toolbox.

like image 105
Josh Avatar answered Oct 12 '22 23:10

Josh