Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with modal dialogs with frames
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.Top := 0;
 FFrameInput.Left := 0;
 // Create second frame
 FFrameFilter.Top := 0;
 FFrameFilter.Left := 0;;

Then I attempt to display the FFrameFilter using TIWModalWindows with this code when I press a button in main form:

      with IWModalWindow1 do
        Buttons.CommaText := '&Ok,&Cancel';
        Title := 'Filter';
        ContentElement :=FFrameFilter.IWFrameRegion;
        OnAsyncClick := FrameFiltroDoOnAsyncClick;

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.Top := 0;
 FFrameFilter.Left := 0;;

the system display correctly the dialog...

How it's possible ? Any idea to solve the issue ?

Please send me a working example where I you can recreate the issue and I can have a look. My e-mail is alexandre [at] atozed dot com. Also, I need to know the Delphi version and IW version you are using
I tried several different test cases and couldn't recreate this issue.
Can you display both frames on the base form (ignore modal display for test).
Assure that the names used on the browser side are unique (ref IWFrameRegion on both frames).

Hi Francesco,
 i got the same problem with
 C++Builder 10.3 Update 1 and
 IntraWeb 15.0.22 Ultimate edition.
 The problem seems to be related to the TIWFrameRegion object which is created for each frame automatically.
 My workaround was to create a separate content region with different names below IWFrameRegion and initialize as follows:
 // Create first frame
 FFrameInput->IWFrameRegion->Parent = NULL;
 FFrameInput->IWFrameRegion->Visible  = false;
 FFrameInput->IWFrameRegionInput->Parent = this;
 FFrameInput->IWFrameRegionInput->Visible = false;
 // Create first frame
 FFrameFilter->IWFrameRegion->Parent = NULL;
 FFrameFilter->IWFrameRegion->Visible = false;
 FFrameFilter->IWFrameRegionFilter->Parent = this;
 FFrameFilter->IWFrameRegionFilter->Visible = false;
 You don't need to use two TIWModalWindow objects if you assign the event handler dynamically.

Forum Jump:

Users browsing this thread: 1 Guest(s)