Ever wanted to place a button inside one of the header controls? Wait no longer because the ButtonSpecs collection now makes this possible.
New controls or new features?
Whenever I ask developers what they would like to see added to the Krypton Toolkit they almost always say they want extra controls. Not an unreasonable request but adding new functionality to existing controls can have just as big an impact on the toolkit.
Although not a single developer has asked for buttons on headers I am betting that once you see it can be done, you will think its a good idea. At least I hope so because I just spent several days adding it!
Static to Dynamic
At the moment you can use the KryptonHeader to add a title or header to a section of your application. Here is a typical example of a header.

This is static control because you cannot do anything with it. In real world applications you will have some actions that are associated with the titled section of the form. Maybe the user is allowed to delete, sort or expand the section.
It would be a better use of space to put the extra actions on the header and not have to place them elsewhere. Well now you can. In this example I have added a button with a delete image to the header.

ButtonSpecs
The KryptonHeader has a new collection property called ButtonSpecs that contains a set of individual button specifications.

For each enty in the collection you get the following list of button specification properties that can be viewed and changed in the standard collection editor.

There are a whole host of properties and I will not try and explain all of them here. But it has the set of features you would expect such as Enabled, Visible, Checked and so forth.
ButtonSpec – Type
One property that is worth mentioning in more detail is Type. When I added the red delete button a little earlier it was assigned the default Type of Generic. This means the button has no implied purpose.
But many applications will want standard actions and so you can instead select one of the alternative Type values of Close, Context, Next or Previous. These types will get the image from the palette. This picture shows the images that are provided with the built in professional palette.

Because they come from the palette you can modify the KryptonPalette component and use alternative images for each of the types, ensuring that the look and feel is consistent for whatever palette styling you are creating.
KryptonHeader
The KryptonHeader has not been neglected and also has the new ButtonSpecs collection. It also has an additional property for each button specification called Location, this allows you to specify which header the button is associated with.
Here is an example where I placed a Previous button on the Near edge of the primary header. The Next button is placed on the Far edge and a Context button on the secondary header.



