Page 1 of 1

Loading frame on DialogEx issues

PostPosted: 15 Aug 2017 22:49
by bryl
Hi,
I am using the following code to load a frame onto a Dialog, the first time the frame paints fine, the second time I load the frame the
buttons and other items that use themes do not repaint.


Image


here is the code to load the frame

Procedure TfrmMain.ShowService(id: string);
var
FRM: TfServiceEntry;
NewName: string;
begin
//NewName:= CGFindUniqueComponentName(Self,'DlgServiceMain');
Frm := Application.FindComponent('DlgServiceMain') as TfServiceEntry;
if not assigned(frm) then begin
FRM:=TfServiceEntry.create(nil);
FRM.Name:='DlgServiceMain';
Frm.Parent:=dlg;//dlgservice;
frm.Align:=alclient;
frm.lblid.caption:=id; //customerserviceid tracker
end;
with dlg do begin
BringToFront;
Visible:=true;
Height:=frm.Height;
Width:=frm.Width;
Left:=(screen.Width-Width)div 2;
top:=(screen.height-height)div 2;
RenderRegionAsync(dlg,rramLazyLoadMethod,True);
end;
end;

Thanks for any help
Bryan

Re: Loading frame on DialogEx issues

PostPosted: 16 Aug 2017 09:28
by Alexander Bulei
Hi bryl,

Please use the correct method of frame creation, as we have in our demo....with CGCallBackDisableAjaxResponse and CGCallBackEnableAjaxResponse.

Best Regards.