Skip to main content
Email Password   helpLost your password?

Sample Image - Common View

Sample Image - Multilevel Tabs

Sample Image - Renaming Item

Introduction

While working on my own Forms designer, I used a Toolbox from another article by Giordio Santini. However, when I saw the Toolbox in VS2005 and, after unsuccessful trials to find something like it on the Internet, I decided to make my own. That is what I've done. This control is derived directly from System.Windows.Forms.Control without using any other controls or components except ScrollBar. All drawing is made by myself and it is divided into three parts: the drawing of the whole toolbox, the single tab and the item.

Using the code

This component is fully supported by the VS designer. Just add a reference to the compiled DLL and add the toolbox or HostToolbox to your form. Alternatively, create it using the following code:

private IP.Components.Toolbox toolbox1;
toolbox1 = new IP.Components.Toolbox();
yourForm.Controls.Add(toolbox1);

You have a wide variety of settings for customizing the toolbox appearance, starting from the height of the tabs and the items, to the colors which are used for the selected item or tab, the hovered item, selection borders, and others. For more details, see the Toolbox Appearance category in the toolbox properties. Starting from version 1.2 of this component, both the Toolbox control and the Tab object implement the ITab interface. It provides support for multilevel Tabs and non-categorized Items because interface defines three primary properties:

Sample Image - Tab Menu

Sample Image - Item Menu

In the Toolbox category, you can find more properties:

Each Tab object has its own properties, which include:

Also, Tab has a readonly field: PointerItem. This is an Item that is always added to a Tab at first place and does not get added to the Items collection. Thus, it cannot be removed. As with Tab, Item objects also have properties: Text, Image, Tooltip, Enabled, Visible, and Selected. I've also added the properties BackColor and ForeColor, but haven't used them. If you want, you can inherit from the Toolbox.Item class, override the OnPaint method and use those properties for drawing before adding your items to the tabs. For programmers, I've added many public and protected methods and events, including:

...and others.

Terms and conditions

The IPToolbox control is provided as free software with source code provided. You can freely use it in your applications, commercial or non-commercial. Ivan Popok, the author of the control, owns the copyright of the control and is NOT responsible for any damage to your application caused by using this control, directly or indirectly.

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalcontrols added to the forms Pin
snow_cap
3:31 17 May '09  
QuestionMenu Pin
LaNono
5:36 6 Oct '08  
Generalhow can i export a form which designed with form generator? Pin
mohi_saboohi
5:10 17 Jul '08  
GeneralCool... thanks... its very helpfull Pin
aschip
2:16 7 Jul '08  
QuestionHow to know which control is drawn from the toolbox Pin
Kumara Swamy
19:06 17 Feb '08  
GeneralHow can I programatically add component from de IPToolbox to my DesignSurface? Pin
yarlen.vasquez
11:55 13 Feb '08  
NewsRightToLeft? Pin
m_jahedbozorgan
22:36 26 Jan '08  
GeneralDrag'n'drop a tab to another tab Pin
MagnusO
3:37 17 Dec '07  
QuestionUsage of this toolbox Pin
Vagga Raghavendra
23:50 13 Aug '07  
Generalkeyboard support ? Pin
[Neno]
0:07 9 Jul '07  
GeneralAbsolute Great Pin
gunigugu
22:32 24 Jun '07  
GeneralWell done! Pin
Nordin Rahman
23:46 25 May '07  
GeneralRe: Well done! Pin
I@n
23:28 28 May '07  
GeneralRe: Well done! Pin
__Andreas__
21:49 2 Jul '07  
GeneralThe Obsolete Serialize functions?? [modified] Pin
[Neno]
12:56 25 May '07  
GeneralRe: The Obsolete Serialize functions?? Pin
I@n
23:19 28 May '07  
QuestionHow show in PropertyGrid list of Controls Pin
bsord_
4:51 25 May '07  
GeneralSave the settings to XML, missing image on item Pin
[Neno]
8:32 23 May '07  
AnswerRe: Save the settings to XML, missing image on item Pin
I@n
22:56 23 May '07  
GeneralRe: Save the settings to XML, missing image on item [modified] Pin
[Neno]
8:18 24 May '07  
NewsRe: Save the settings to XML, missing image on item Pin
I@n
5:07 25 May '07  
GeneralRe: Save the settings to XML, missing image on item Pin
[Neno]
7:33 25 May '07  
GeneralAntiAliased Text Pin
kin3tik
11:20 8 May '07  
GeneralRe: AntiAliased Text Pin
I@n
22:57 23 May '07  
Questiondelete some of the context menu items [modified] Pin
Probeer Das
3:16 29 Mar '07  


Last Updated 25 May 2007 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009