4D v13

Inserting an Object

Home

 
4D v13
Inserting an Object

Inserting an Object  


 

 

Display the OLE area in your application. You may need to execute the form.

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 4D OLE area:

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

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.

You can cut or copy an object in an OLE application and then paste it into an OLE area in 4D.

To do this, you just need to select the object to be inserted in the OLE application and then choose Copy or Cut in the Edit menu of the application.
Then, in 4D, place the mouse in the OLE area and click. Your selection will then appear in the OLE area.

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 4D OLE area.

 
PROPERTIES 

Product: 4D
Theme: Using an OLE Area