Layout Changed Event / How to Re-Init

Hi TMS Team,

While migrating TMS OS/GM maps components to TMS FNC maps
I found an issue with form that was built using Docking manager.

Steps:
1) Create VCL Form / DX 10.3 
2) Add Docking Manager to form / Latest DevExpress
3) Create Docking Site with 2 Docking Panels:
 Left Panel - OS Map,  Right Panel - FNC Map
4) Run exe 
  >> Result: both maps visible

5) Resize Panels: move splitter right or left  
  >> Result: Both maps visible

6) Change Layout: Move OS Map - Top. move new FNC Map - Bottom.

Result:
Old OS Map is updated / visible. FNC - blank screen.
I tried all functions: Reload, Reinitialize, Resize,...It doesn't help.

Note: without "Launch" old OS map is not displayed after layout change

Question:
Do we have a function in FNC Maps that is similar to "Launch" in old OS Maps
that may be used on Layout Change Event? or any other workaround...

Also, I found that when using different map types: old TMS OS and old TMS GM - then system crashes on layout change. This is not critical - because we are switching to new FNC. 
Just need to know how re-init FNC.

Our app is quite complicated, contains many windows, custom layouts, grids, charts, maps, and docking manager is important. Also, because new FNC maps are very fast and flexible, we'll add more TMS maps to GUI. 

procedure TForm1.dxDockingManager1LayoutChanged(Sender: TdxCustomDockControl);
begin
  WebOSMaps1.Launch;   // this works for OS Maps
  TMSFNCMaps1.Reload;  // How re-Init ?
end;
  
Thank you.

Hi,


The equivalent function for re-initialization is: TMSFNCMaps1.Reinitialize; If this function is not doing anything then unfortunately we'll have to further investigate what is happening. The browser is a separate window that is tied to a handle (in FMX, the handle of the form, In VCL the handle of the control) and the repositioning happens within the form based on the control it is tied to. Unfortunately as we do not have DevExpress controls installed here we cannot test it. It would be very helpful if we could have some sort of test project so we can investigate what is happening. Alternatively, Toggling the Visible property might be an idea.

Hi Pieter,


OK. I've sent my test project to TMS:
DX 10.3. form, 3 docking panels (2 - OS Maps, 1 - FNC map)

If you just resize - all maps visible
if you change layout (drag and drop) - only old TMS OS Maps visible 
(because they use Launch)
Reinitialization or Visibility change - doesn't help.

TMS and DevExpress are major SW vendors for DX.
Not clear what is the source of issue :DX, DevExpress, Edge or FNC maps.
GUI of our system is based on DevExpress libraries mainly.

Please, let me know if you need more details.

Thank you.

it's not DevExpress issue. 

It's related to changing FNC Map parent / Initialization.

simple scenario:

1) create a form with 4 panels
2) drop OS Maps to Panel1, drop FNC map to Panel2
3) Add Button / on click: change parents
procedure TForm1.cxButton1Click(Sender: TObject);
begin
  TMSFNCMaps1.BeginUpdate;
  TMSFNCMaps1.Parent := Panel4;  // was panel2
  WebOSMaps1.Parent := Panel3;   // was panel1
  TMSFNCMaps1.Visible := False;
  WebOSMaps1.Launch;
  TMSFNCMaps1.ReInitialize;
  TMSFNCMaps1.Visible := True;
  TMSFNCMaps1.EndUpdate;
end;
--------------
Result : 
FNC Map is not displayed. 
OS Map is Displayed (Launch)


Hi,


I have applied a fix for this issue, the next version will address this

Hi,  I've switched one of OS Map + GMaps forms (tracker) to FNC Map, but it's a part of

DevExpress GUI / not visible now. Will wait for new version. Thank you!
Hi,

I've installed the latest version, May 26. 
this fix works for simple parent change example only (my comment on May 17), 
and still doesn't work with DevExpress Layout (example that I emailed to TMS same day). 
subject: FNC maps / DevExpress (Docking).

FNC Map is NOT visible after any layout change, vs. TMS OS Maps (old version) works fine in DevExpress.
Could you suggest any solution for FNC Maps initialization similar to "Launch" that works with old TMS maps?
After switching from OS Maps to FNC maps - maps not visible in GUI. Can't be used with DevExpress.


Thank you.
it works for parent change example (new version, May 26) 
and still doesn't work for layout change (DevExpress GUI / docking, layouts), 
the only difference is that parent is not changed in DevEx.
it seems that FNC initialization works if new parent <> old parent only...

so I've found a work-around - for DevX layout change event:
I just temporary change FNC Maps parent from DevEx panel to any other control (for example TPanel) and then set it back to DevX panel 

Result: FNC initialization works - map is visible in DevExpress GUI!

Hi,


Thanks for your input and workaround! It's unfortunately difficult for us to indentify this issue here with DevExpress controls as we don't have their docking controls installed, but if you have a reproducible cases in another situation, please don't hesistate to contact us.

Pieter Scheldeman2020-05-27 08:50:58
Hi Pieter,
Our system is quite old (25) and all UI is DevExpress (last 15 years).
From POV of GUI quality and UI Features - we can't drop DevEx..
But your FNC Maps is a real "diamond"!
I wish that TMS continue to invent and create such innovative solutions in the future.

Thanks again.

Hi,


Ofcourse you should not drop UI controls if you are happy with it, but what I meant was: If you have a reproducible case in another circumstance that mimics the docking feature of the DevExpress controls then it will be better for us to investigate what exactly is going wrong.