1

I'm new to C++ Builder. Now I'm creating a ribbon with action manager and image list. Action icons are small and not looks like Office buttons

small icons

but they must be like this

enter image description here

how can I do it?

Rinat
  • 1,941
  • 2
  • 17
  • 26

1 Answers1

1

So, I thought, that in Delphi standard action icons must be as Office Ribbon icons.

But now I know, that you have to get this icons from another way to use them :) I used this tool https://imagemso.codeplex.com/ ("Office 2010 Add-In: Icons Gallery" - How to extract icons from backstage tab (docx))

And for different sizes you must make two TImageList components. one of them will store 16x16 icons, another will store 32x32 icons. If you using png, you must set ColorDepth = cd32Bit, DrawingStyle = dsTransparent.

Then in ribbon's TActionManager you must set Images and LargeImages properties to this image lists.

Then we setting ImageIndex property of TActions.

Finally, when you create ribbon item by moving TAction to ribbon group area and getting TActionClientItem, if you want big icon, you must set CommandProperties.ButtonSize to bsLarge.

Maybe it is very simple, but I passed a lot of time to learn all of it.

Community
  • 1
  • 1
Rinat
  • 1,941
  • 2
  • 17
  • 26