Inserting an Object

4D - Documentation   Français   English   German   OLE_Tools, Contents   OLE_Tools, Index   Back   Previous   Next

version 3.5


Once you have created an OLE area in your application, go to the User environment.

Creating and Inserting an OLE Object

If your area is located for example in a form, add a new record. Click within the OLE area whose frame should appear.

Click in the area using the right mouse button.

The OLE pop-up menu appears:

Choose Insert Object from the menu. The standard Insert Object dialog box is displayed. Choose for example PaintBrush picture and click OK:

The PaintBrush Windows application is launched and opens an Untitled document. Move the PaintBrush window so you can see both this window and the OLE area in your layout.

Note that the OLE area is now displayed with cross-hatches signaling that its contents is being edited by the OLE source application.

Make a simple drawing in PaintBrush. Note that your drawings appear concurrently within PaintBrush and your 4th Dimension OLE area:

Note: With certain old versions of Windows OLE applications, you may find that the source OLE application does not update the 4th Dimension OLE client area automatically. If this happens, choose Update from the File menu of the OLE source application to force the update.

Inserting a Document into an OLE Area

In the previous example, you have created a linked and embedded object from scratch. You can also store an existing document. To do so, choose the option Create from file in the standard Insert Object dialog box rather than the option Create New.

For more information about the options of the standard OLE Insert Object dialog box, please refer to your Windows documentation.

Drag and drop

Instead of using the OLE pop-up menu to insert an object, you can directly drag and drop the object from an OLE source application to your client OLE area. To do so, select the data from your OLE source application, press the Ctrl key, click, and drag and drop the selection over your 4th Dimension OLE area.


4D - Documentation   Français   English   German   OLE_Tools, Contents   OLE_Tools, Index   Back   Previous   Next