Image Field show pictures from file

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Mar 6, 2018
Company: Bodega LLC

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


 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Mar 6, 2018
Company: Bodega LLC

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....

 
#3
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

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

1C Company support team
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.