I'm using Delphi 12 Athens, and have a custom style applied to my application.
I would like to get the images of a TDBNavigator to assign them to a specific TSpeedButton.
Is this possible?
I've try this, but the images returned are the defaults for the component:
ic := TImageList.Create(self);
nav := THackDBNavigator.Create(self);
ic.Assign(THackDBNavigator( nav ).GetButtonImageList);
SpeedButtonFirst.Images := ic;
SpeedButtonFirst.ImageIndex := Integer(nbFirst);
There is no direct way to get the images from a style but you can use DrawElement:
Update: DrawElement is drawing already transparent. Check in unit Vcl.StyleAPI in method TSeBitmapObject.DrawNormal in line 5499 if DrawBitmap.Image.Transparent is set