If I put the following code
Code:
with TSpeedButton.Create(self) do
begin
Width:=50;
Height:=50;
Top:=50;
Left:=50;
Parent:=self;
Caption:='xx';
end;
in the OnCreate-event of a form, then the button is skinned.
If I put it into the OnClick of a button and it's performed after the OnShow has been performed, then the button is not skinned.
I figured out I can call sSkinManager1.RepaintForms, but this creates some short animation.
Any other way to get the skinning working here?
(I populate some areas of a form with buttons right after the OnShow. I need to do that because the app has to show it's main form quickly even if buttons are loaded a bit later. This way the app looks faster and more responsive. So there's no real way around that)
Thanks,
Ralf