[DUG] png buttons, actionbars

Jeremy North jeremy.north at gmail.com
Wed Oct 3 10:55:40 NZDT 2007


Hi,

The architecture behind the ActionManager stuff is pretty good once
you get your head around it. It is easy to create new "styles" and use
those. I personally have a Vista style (the Vista style uses separate
imagelists for normal and disabled images), an Office2003 style (as
seen in my QC Client) and also part* of the Office Ribbon implemented.

Since Delphi 2007 was a non-breaking release, many of my fixes and
enhancements to the ActionManager code base couldn't be used. A number
of items were fixed in Delphi 2006 as I was in close contact with
Steve Trefethen (original author) at the time. (he has since left
CodeGear).

I am anticipating that for Delphi 2008 more of the breaking fixes and
enhancements will be used.

I have an article on the CodeGear site that shows how to customise an
existing style and add some candy. There were some compromise made in
the article that are not in the real code I use.

You can view the article at: http://dn.codegear.com/article/33461

As for where the shadows are drawn for the XP style it is in the
XPActnCtrls unit. The DrawGlyph method of the TXPStyleMenuItem class.

If you would like a custom style and don't want to go to the effort of
starting from scratch, I'm sure we could work something out.

cheers,
Jeremy

On 10/3/07, Alister Christie <alister at salespartner.co.nz> wrote:
> I've been using PNGComponents (http://thany.org) for awhile now and
> found them pretty good.  I've never actually used a TActionToolBar (I
> probably should investigate more) but can verify the problem your
> having.  It will probably relate to the TActionToolBar trying to draw
> the shadows and not having support for the alpha channel - I suspect
> fixing this would be challenging, I've had a quick look at the source
> but can't find the code that specifically draws the shadow - however
> many of the related methods are virtual so you maybe able to write a
> descendant with better PNG support.  I unfortunately have to disappear
> onsite with a client (otherwise I'd try to track it down).


More information about the Delphi mailing list