The 1C:Enterprise developers forum
Hello!I want to show images from file when any item selected from tabularsection. But it is not showing. Here is my 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
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....
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 sectionBest regards,Vladimir Gurov