[Lazarus] Zooming a form
Luca Olivetti
luca at wetron.es
Tue Jun 21 15:15:09 CEST 2016
El 21/06/16 a les 13:45, Mattias Gaertner ha escrit:
>
> Simple example:
>
> MainControl.DisableAlign;
> try
> MainControl.SetBounds(Width*f,Height*f);
> for aControl in List do
> aControl.SetBounds(aControl.Left*f,aControl.Top*f,aControl.Width*f,aControl.Height*f);
> finally
> MainControl.EnableAlign;
> end;
>
I just use ScaleBy, it recursively scales all components.
I do in in the FormShow method, I don't remember the details but I think
it didn't work well when the form was still hidden.
Another problem is that it also moves the Top,Left of the form, but I
just restore it after the ScaleBy
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
More information about the Lazarus
mailing list