Simplicty and flexibility!


New Sample: How to manipulate an image in a form

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Sample: How to manipulate an image in a form

Download Sample



There is two ways to display and image based on field in DataEase 8.5

Either using the ImageField or the more versatile WebField.

Here we will focus on the ImageField which is the simpler approach of the two

An ImageField can both be the editfield and the view field for the image, but we think this is not very elegant so we prefer to use a normal text field as the storage and then use a virtual and write protected ImageField as the "viewer".

In this sample we show you how you can use SetValue() and GetFileName() to pick an image and save the path in the database.

One limitation with image fields is that the size is pre-set so you can either display the image "stretch to fit" or "as is" but then it will be displayed in the centre of the image field.

In 8.5 you can get MoveObject() to Re-size the Imagefield to fit the image viewed. (we also show how you can use MoveObject to move it too...)

We do it on buttons here, but you can do all this automatically when you load the image in a form.

See how you can use L C R , fixed position and relative position to move objects with MoveObject().

Have a go.


Written by DataEase 12/01/16 at 19:04:45 Dataease [{8}]FIVE
DG3_BlogList