I just tested this to use 32x32 icons in a toolbar inside a CoolBand:
- Add an image list. Set its Width and height to 32. Add 32x32 png images.
- Add a toolbar, assign the image list to its Images property. Set its AutoSize to true. The images are still larger than the spacie provided by the toolbar --> Set Toolbar.ButtonWidth and .ButtonHeight to something like 40.
- Add a TCoolbar, add a CoolBand. Assign the Toolbar to the CoolBand.Controls. Set The Coolbar's AutoSize to true
Good. This make the CoolBand take the height of the ToolBar. But if then you change the Toolbar height:
ToolBar1.ButtonHeight := 25;
The CoolBand doesn't change the height.
But this give me an idea. If the Coolband adapt to the Toolbar height, when set. Then I have to do:
ToolBar1.ButtonHeight := 25;
CoolBar1.Bands[0].Control := nil;
CoolBar1.Bands[0].Control := ToolBar1;
Every time I want to change the height of the ToolBar.
And it works.
I've the feeling this is not the normal behaviour for the Coolbar.