Any Embedded window with ADM2 smartframes smartwindows tips

Posted by dhubbuck on 20-Sep-2010 04:01

Hi

We have started a transformation of our application making use of the OERA and Ultracontrols and OOABL.  This all seems to be going well but will take some time to have a system ready for demos to our customers.

We have decided to modernise our main navigation and module windows and call some of our old ABL windows.  

On our old application the main module windows made use of some of the ADM2 features,  mainly the smartfolder and some smartframes for showing related data at the bottom of the screen like a tab control.

I was wondering if anybody as embedded a smartframe within the embedded window control either as its own instance or by the use of a smartwindow with a smartfolder?

Thanks

Dale

All Replies

Posted by Admin on 20-Sep-2010 05:16

I was wondering if anybody as embedded a smartframe within the embedded window control either as its own instance or by the use of a smartwindow with a smartfolder?

 

You can't directly embed frames. Embedded Windows will only work with windows. What we typically do with ADM1/ADM2 applications when it's desired to use an UltraTab for the visualization of the SmartTabFolder is to dynamically (on the fly) create window widgets and embed them, then reparent the frame to this window so that (from the uses point of view) the SmartFrame is embedded on an UltraTab page.

The screenshot on the bottom right of this page http://www.consultingwerk.de/winkit_showcase/?L=1 have been created that way.

This typically requires some ADM2 customization in constructObject. This is where I dynamically create the window with a default frame and pass this new default frame as the parent to the new SmartObject. Of course then you'll also have to tweak the positioning of the SmartObject, as the contents of the UltraTabPage are really parented in the container control (and not parented/positioned to the top left corner of the window).

Posted by dhubbuck on 20-Sep-2010 15:44

Thanks for the quick reply Mike.

So we need to overirde constructobject and create a window handle with which we use as a parent for the smartframe.

Is there anyway to create the window in the .net form and use some adm2 call to pass it as a container for the smartframe.

also Is this why the error 14837 this window may not be embedded because it is already realized appears?

thanks again

Dale

Posted by Admin on 20-Sep-2010 15:51

So we need to overirde constructobject and create a window handle with which we use as a parent for the smartframe.

 

Yes. But I also create a dynamic frame in that smartwindow, because constructObject expects a frame, not a window as the parent.

Is there anyway to create the window in the .net form and use some adm2 call to pass it as a container for the smartframe.

That's my preferred way of doing it. I do most coding in the form, because OOABL is my preferred way of coding.

 

also Is this why the error 14837 this window may not be embedded because it is already realized appears?

 

Unlikely. You definitively need to use a method library to set the EmbeddedWindow property (see my Exchange Online Presentation or http://blog.consultingwerk.de/consultingwerkblog/2010/09/openedge-gui-for-net-adoption-and-migration-strategies-part-4-understanding-embedded-windows/). A typical cause for the error you are describing is also that you are loading an Icon to the Window. Loading an icon causes the window to be realized (created in the Windows API and not just a struct in the Progress client).

Posted by Thomas Mercer-Hursh on 20-Sep-2010 15:58

FWIW, if I were in your position, I would quickly budget for a consultant to guide me through this process.  You can probably guess whom I would recommend (not me!)

This thread is closed