Make list image bigger in Dynamics Nav 2013

1.6k Views Asked by At

I would like to make image bigger on an item list in Dynamics Nav 2013. What I could do so far is fetch the image and display it on the list.

enter image description here

To achieve this I call SearchImage function on OnAfterGetRecord :

OnAfterGetRecord()
SearchImage;

SearchImage function :

// C/AL Code
SearchImage()
//MESSAGE('1');

IF xRec."No."<>"No." THEN BEGIN
//MESSAGE('1');
  CLEAR(TmpImg_gInit);
  TmpImg_gInit.INIT;
  //CurrPage.PictBox2.PAGE.SetRec(TmpImg_gInit);
  //CurrPage.PictBox3.PAGE.SetRec(TmpImg_gInit);

  i := 1;
  //MESSAGE(FORMAT(TIME));
  TmpImg_gInit.INIT;
  TmpImg_gInit.RESET;
  TmpImg_gInit.SETCURRENTKEY("Table ID","Document Type","No.","Line No.","Version No.","Picture No.");
  TmpImg_gInit.SETRANGE("Table ID",27);
  TmpImg_gInit.SETRANGE("Document Type",0);
  TmpImg_gInit.SETRANGE("No.","No.");
  //TmpImg_g.SETAUTOCALCFIELDS(Picture);
  IF TmpImg_gInit.FINDFIRST THEN BEGIN
    TmpImg_gInit.CALCFIELDS(Picture);
  END;

  //MESSAGE(FORMAT(TIME));

  REPEAT
    TmpImg_gInit.CALCFIELDS(Picture);

    i:= i+1;
    xRec."No.":="No.";
  UNTIL TmpImg_gInit.NEXT = 0;
//  CUDiv.SendKey('{F5}');
END;

Then in my list I can add a new field that point to TmpImg_gInit.Picture and this will display the item's image.

The thing is the displayed image is tiny (whereas the source image is big). The image is automatically resized to fit in the list height.

I would like to know how I could display this image bigger. Is there a way to do that easily (without add-ins) ? If not can you give me directions on how to do that ?

1

There are 1 best solutions below

5
Jake Edwards On

You can use a FactBox which will display a larger image on the right hand side of the screen.

However, it will only show the picture of the item that you've selected. For things like product images, this is optimal. E.g. loading lots of hi-res product images can put strain on the users PC.

The image size when inline on a page cannot be changed and are better suited to things like Status icons, e.g. traffic lights.

Custom Control Add-ins

NAV does support modification of the page UI through Control Add-ins. You'll need to create a test project/control that is an image and see whether it will let you expand the height above the set row height.

You can get more information on sizing of Control Add-ins on MSDN.