Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with modal dialogs with frames
#1
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
Reply


Messages In This Thread
Problems with modal dialogs with frames - by Francesco - 06-05-2019, 07:51 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)