Skip to Content
0
Mar 05, 2013 at 04:21 PM

How to scale an image in a FPM List GUIBB?

286 Views

Hi

In one of the columns in the list guibb (IF_FPM_GUIBB_LIST) I place an image (every row a different image).

For doing that I used the image_ref component of fpmgb_s_listfield_descr structure and defined it in the GET_DEFINITION method.

Something like this:

CLEAR ls_field.

ls_field-name = 'PREVIEW'.
ls_field-image_ref = 'IMAGE_URL'.

APPEND ls_field TO et_field_description.

CLEAR ls_field.
ls_field-name = 'IMAGE_URL'.
ls_field-visibility = 01.
APPEND ls_field TO et_field_description.

In der configuration for this list guibb component this particular column (PREVIEW) is defined as display-type:

'Link on Action'

During the event loop the data gets filled including a valid url to an image (IMAGE_URL field-component gets a url to a image).

That all works fine however unfortunately the images come along in different sizes (width/height) and therefore the list looks pretty bad.

big picture -> big row

small picture -> small row

etc

Anybody any suggestions how I could scale/resize all this images to a certain fix size? E.g. all to a maximum of 200 pixels width?

Thanks