06-05-2019, 07:51 AM
Hi, I'm attempting to show alternatively two modal dialogs using two TIWFrame and TIWModalWindows.
In IWAppFormCreate event I have added this code to create the frames:
// Create first frame
FFrameInput:=TIWFrameInput.Create(WebApplication);
FFrameInput.Name:='FrameInput';
FFrameInput.Top := 0;
FFrameInput.Left := 0;
FFrameInput.IWFrameRegion.Parent:=Self;
FFrameInput.IWFrameRegion.Visible:=False;
// Create second frame
FFrameFilter:=TIWFrameFilter.Create(Self);
FFrameFilter.Name:='FrameFilter';
FFrameFilter.Top := 0;
FFrameFilter.Left := 0;;
FFrameFilter.IWFrameRegion.Parent:=Self;
FFrameFilter.IWFrameRegion.Visible:=False;
Then I attempt to display the FFrameFilter using TIWModalWindows with this code when I press a button in main form:
RenderInvisibleControls:=True;
with IWModalWindow1 do
begin
Reset;
Buttons.CommaText := '&Ok,&Cancel';
Title := 'Filter';
ContentElement :=FFrameFilter.IWFrameRegion;
OnAsyncClick := FrameFiltroDoOnAsyncClick;
Show;
end;
But instead the FFrameFilter the system displays the other one, the FFrameInput !
I assign to ContentElement the FFFrameFilter.IWFrameRegion and it display the FFrameInput.IWFrameRegion !!!
If in IWAppFormCreate I remove the code for creating the FFrameInput leaving only this code:
// Create only the second frame
FFrameFilter:=TIWFrameFilter.Create(Self);
FFrameFilter.Name:='FrameFilter';
FFrameFilter.Top := 0;
FFrameFilter.Left := 0;;
FFrameFilter.IWFrameRegion.Parent:=Self;
FFrameFilter.IWFrameRegion.Visible:=False;
the system display correctly the dialog...
How it's possible ? Any idea to solve the issue ?
Francesco
In IWAppFormCreate event I have added this code to create the frames:
// Create first frame
FFrameInput:=TIWFrameInput.Create(WebApplication);
FFrameInput.Name:='FrameInput';
FFrameInput.Top := 0;
FFrameInput.Left := 0;
FFrameInput.IWFrameRegion.Parent:=Self;
FFrameInput.IWFrameRegion.Visible:=False;
// Create second frame
FFrameFilter:=TIWFrameFilter.Create(Self);
FFrameFilter.Name:='FrameFilter';
FFrameFilter.Top := 0;
FFrameFilter.Left := 0;;
FFrameFilter.IWFrameRegion.Parent:=Self;
FFrameFilter.IWFrameRegion.Visible:=False;
Then I attempt to display the FFrameFilter using TIWModalWindows with this code when I press a button in main form:
RenderInvisibleControls:=True;
with IWModalWindow1 do
begin
Reset;
Buttons.CommaText := '&Ok,&Cancel';
Title := 'Filter';
ContentElement :=FFrameFilter.IWFrameRegion;
OnAsyncClick := FrameFiltroDoOnAsyncClick;
Show;
end;
But instead the FFrameFilter the system displays the other one, the FFrameInput !
I assign to ContentElement the FFFrameFilter.IWFrameRegion and it display the FFrameInput.IWFrameRegion !!!
If in IWAppFormCreate I remove the code for creating the FFrameInput leaving only this code:
// Create only the second frame
FFrameFilter:=TIWFrameFilter.Create(Self);
FFrameFilter.Name:='FrameFilter';
FFrameFilter.Top := 0;
FFrameFilter.Left := 0;;
FFrameFilter.IWFrameRegion.Parent:=Self;
FFrameFilter.IWFrameRegion.Visible:=False;
the system display correctly the dialog...
How it's possible ? Any idea to solve the issue ?
Francesco