Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Image Field show pictures from file

Forum

Search UsersRules
Image Field show pictures from file
#1
Active user
Points:: 0
Joined:: Mar 6, 2018

Hello!
I want to show images from file when any item selected from tabularsection. But it is not showing. Here is my code;

Code
&AtClient
Procedure ÜrünlerSelection(Item, SelectedRow, Field, StandardProcessing)
   
   // Insert handler content.
   ThisObject.ChoosenProduct = Object.Ürünler.get(SelectedRow).Code;
   resim =Right(ThisObject.ChoosenProduct,StrLen(ThisObject.ChoosenProduct)- 1);
   //message("C:\Users\User\Desktop\yashar_сайт\Новая_папка" + resim +".jpg"); 
   address = "C:\Users\User\Desktop\yashar_сайт\Новая_папка\"+resim +".jpg" ;
   BeginPutFile(New NotifyDescription("ChangePictureAfterPutFile", ThisForm),,address,False, UUID);
 EndProcedure

&AtClient
Procedure ChangePictureAfterPutFile(Result, Address, SelectedFileName, AdditionalParameters) Export
   If Result Then
     ThisObject.PictureAddress = Address;
   EndIf;
EndProcedure


Profile
#2
Active user
Points:: 0
Joined:: Mar 6, 2018

I think I have to explain what i want to do;

* My items names in list are same with pictures in folder.
* When i sel ect any item in list, i want to show picture of it.

I can choose picture fr om folder, but it can not show in image Field....

Profile
#3
Interested
Points:: 0
Joined:: Dec 4, 2017

Dear eyup yilmaz,

A proper way to work with images in your scenario is to:

- extend your products with an image attribute

- for each product, save the image to this attribute

- in your code, display the contents of the attribute (the image) upon selecting an item of the tabular section

Best regards,
Vladimir Gurov

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.