Page 1 of 1

Size of CGRegion after Reize by Spliiter

PostPosted: 07 Apr 2017 20:06
by mrcarver
CG Gurus,

How can one capture the "NEW" size of a CG region after resizing with the region's splitter?

Thank You.
Monte Carver

Re: Size of CGRegion after Reize by Spliiter

PostPosted: 10 Apr 2017 09:17
by Alexander Bulei
Hi mrcarver,

How can one capture the "NEW" size of a CG region after resizing with the region's splitter?


You mean IWCGJQRegion1.Splitter = True ?

Best Regards.

Re: Size of CGRegion after Reize by Spliiter

PostPosted: 10 Apr 2017 15:03
by mrcarver
Yes. I have are CGRegion where the Spliiter = True. How can one capture the WIDTH after resizing with the splitter. My intent is to cookie the width such that the reqion can be presized upon future rendering. But I can find an obvious way to capture the resized region.

Regards,
Monte Carver

Re: Size of CGRegion after Reize by Spliiter

PostPosted: 10 Apr 2017 15:06
by Alexander Bulei
Hi mrcarver,

Yes. I have are CGRegion where the Spliiter = True


It's intraweb property, we don't have control above that.

Best Regards.

Re: Size of CGRegion after Reize by Spliiter

PostPosted: 19 Jul 2018 13:20
by roland
I did not understand the answer.
If a region is resized, how can we persist the new width, so if a form is released and recreated the user does not need to manually size the region again?

Re: Size of CGRegion after Reize by Spliiter

PostPosted: 19 Jul 2018 14:17
by Alexander Bulei
Hi roland,

I did not understand the answer.


It's mean, that property is not our, it's Intraweb property.
Ask them about that property.

Best Regards.

Re: Size of CGRegion after Reize by Spliiter

PostPosted: 19 Jul 2018 16:56
by roland
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 :roll:

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;