CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Size of CGRegion after Reize by Spliiter

by mrcarver » 07 Apr 2017 20:06

CG Gurus,

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

Thank You.
Monte Carver
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 10 Apr 2017 09:17

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mrcarver » 10 Apr 2017 15:03

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
mrcarver
 
Posts: 70
Joined: 05 Jun 2012 10:51

by Alexander Bulei » 10 Apr 2017 15:06

Hi mrcarver,

Yes. I have are CGRegion where the Spliiter = True


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

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by roland » 19 Jul 2018 13:20

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?
roland
 
Posts: 55
Joined: 26 Jun 2014 22:52

by Alexander Bulei » 19 Jul 2018 14:17

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by roland » 19 Jul 2018 16:56

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;
roland
 
Posts: 55
Joined: 26 Jun 2014 22:52


Return to JQRegion

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.