CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

InitClosed problem

by Eric.P » 27 Oct 2016 16:10

Hi CGDevtools !

I have a button where i create 2 layoutpanelregion on a layout component (present in design time) in the click event.
The first is alRight, initClosed width 200 with an accordion component inside
The last is alClient with a grid inside

When i click on the button, the layoutpanel alClient doesn't take all the place as expected but left a white space with 200 width (where should be the first layout if he was opened), the splitter on the layout iniclosed is on the right as expected,

see img1

when i open the splitter and reclose it, the layout alClient take all the place.

see img3

Is there something wrong with my code ? i expected to have the img3

Code: Select all
uses
  Unit2, Unit3, IWCGAsyncRender;


procedure TIWForm1.IWCGJQButton1JQButtonOptionsClick(Sender: TObject;
  AParams: TStringList);
var
  lNewPanel, lNewPanel2:TIWCGJQLayoutPanelRegion;
  lFraGrid:TIWFrame2;
  lFraAcc:TIWFrame3;
begin
  IWCGJQLayout1.Align := alClient;
  IWCGJQLayout1.Visible := true;

  lNewPanel := IWCGJQLayout1.AddNewPanel;
  lNewPanel.Name := 'PanelAcc';
  lNewPanel.Align := alRight;
  lNewPanel.Width := 200;
  lNewPanel.PanelOptions.InitClosed := true;
  //lNewPanel.PanelOptions.ClosePanel;

  lFraAcc := TIWFrame3.Create(lNewPanel);
  lFraAcc.Parent := lNewPanel;
  lFraAcc.Align := alClient;

  lNewPanel2 := IWCGJQLayout1.AddNewPanel;
  lNewPanel2.Name := 'PanelGrid';
  lNewPanel2.Align := alClient;
  lFraGrid := TIWFrame2.Create(lNewPanel2);
  lFraGrid.Parent := lNewPanel2;
  lFraGrid.Align := alClient;

  RenderRegionAsync(IWCGJQLayout1);
end;
You do not have the required permissions to view the files attached to this post.
CG 3.0.0.115 / IW 14.59 / XE8
Eric.P
 
Posts: 24
Joined: 24 Aug 2016 15:07

by Alexander Bulei » 27 Oct 2016 18:14

Hi,

Try to call the RenderRegionAsync with parameters:

Code: Select all
  RenderRegionAsync(IWCGJQRegion1,False,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 Eric.P » 28 Oct 2016 14:32

Ty Alexander,

it works perfectly.

Regards
CG 3.0.0.115 / IW 14.59 / XE8
Eric.P
 
Posts: 24
Joined: 24 Aug 2016 15:07


Return to JQLayout

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.