Ah - now I got it.
I have a feature suggestion then: Add something like the persist option of the grid to your region component. If that is possible.
I solve it now like this ... but have no idea if it is the best way to do it. And will probably never find out
I call where needed (when leaving the form and when resizing a relevant region) ...
procedure TFormTestManagement.PersistRegionSize;
begin
try
WebApplication.Response.Cookies.AddCookie('RegionHeigthTop',
RegGrid.Height.ToString, '/', IncYear(now, 5));
WebApplication.Response.Cookies.AddCookie('RegionMainRight',
RegMainRight.Width.ToString, '/', IncYear(now, 5));
except
//do what you think you need to do
end;
end;
When the form is created I get those cookies ...
procedure TFormTestManagement.IWAppFormCreate(Sender: TObject);
begin
try
RegGrid.Height := StrToInt(WebApplication.Request.CookieFields.Values
['TestmanagementRegionHeigthTop']);
RegMainRight.Width := StrToInt(WebApplication.Request.CookieFields.Values
['TestmanagementRegionMainRight']);
except
//maybe figure out the best size according to some contextinfo
end;
end;