1
Вопросы / Questions / Re: How to keep an image's aspect ratio?
« on: December 11, 2023, 18:25:02 »
I still like the winamp skins that put pictures on it,but there are not many around now I want to try for myself,I worked it out,it seems script is needed.
because you don't want it to push other things,one way is panel with skin,then create a script on onresize.
because you don't want it to push other things,one way is panel with skin,then create a script on onresize.
Code: [Select]
procedure Execute(Sender, Arguments: TComponent);
var
Panel: TComponent;
begin
Panel := FindObject('Panel');
Panel.Set('PlaceInfo.Size.Width', Panel.Get('PlaceInfo.ActualHeight')*367/338 );
end;
I think it would be useful for some kinds of pictures and with this it is easy for anyone to just put a picture they like in background.