9

I just played around with the new Delphi 2009 ribbon, added a few pages, groups and actionclients (large buttons) to it. I created some transparent 32x32px PNGs in Photoshop and put them into a TImageList (set to cd32bit). I added this list to the Actionmanager's Images property, to show them on the buttons. At designtime the icons in the ribbon look just fine, but when compiling and starting the app they have a black background. Any idea what causes this and how I can fix this? I do not want to create the images with the ribbon color as background, because I cannot switch to another colorset of the ribbon then.

Thanks in advance Marc

RRUZ
  • 134,889
  • 20
  • 356
  • 483
user133370
  • 167
  • 1
  • 5

2 Answers2

12
  1. Ensure that Application theme is enabled by: Project > Options > Application > Enable runtime theme.

  2. Have you tried to set the DrawingStyle property of Imagelist to dsTransparent?

Mohammed Nasman
  • 10,992
  • 7
  • 43
  • 68
  • Thanks! You were right. "Enable runtime theme" had to be checked. Why is this not enabled by default? – user133370 Jul 05 '09 at 16:26
  • It should be enabled by default, but seems you are upgrading from older version which you have to turn it Manually – Mohammed Nasman Jul 05 '09 at 16:37
  • +1 Mohammed for a nice quick answer, but one minor suggestion to improve the English: "Insure" should be "Ensure that" – Argalatyr Jul 05 '09 at 16:39
  • @sinner, don't you think you should also give Mohammed's answer an up-vote? – Argalatyr Jul 05 '09 at 16:41
  • @Argalatyr: I am new here and have not yet earned any reputation points. I need 15 of them to up-vote the answer. How do I get them? Do I need to answer other questions? – user133370 Jul 05 '09 at 16:46
  • @Argalatyr, Thank you for the correction. @sinner, you can have more reputation by getting votes for your questions and answers. – Mohammed Nasman Jul 05 '09 at 16:55
  • @sinner: sorry - I forgot that restriction. Happily, it no longer applies to you! – Argalatyr Jul 05 '09 at 17:05
0

Very late answer, but maybe it helps someone.

I had the same problem, and Mohammed's suggestion still didn't fix it. It turns out you also have to set TImageList.ColorDepth to cd32Bit.

By default it's set to cdDeviceDependent.

Object Inspector

Wouter van Nifterick
  • 23,603
  • 7
  • 78
  • 122