07-04-2022 07:37 AM
Hello !
I want to set a picture on my uir but I don't know how to do it.. I have a button, when you click on it , a FileSelectPopup is appearing , we select an image and then i want the image to appear on my uir.
I wanted to do a SetCtrlAttribute with a Control Value but I don't see it ...
I also searched on the community but the web links just put me in the main page of the Manuel of Labwindows...
Solved! Go to Solution.
07-04-2022 08:10 AM
Use a picture control where to load your image.
07-04-2022 08:15 AM
But how can I load the Picture ?
Kind regards
07-04-2022 08:30 AM
This is a very general question that refers to CVI as a whole rather than the picture control.
When you have a controlon a panel you can right-click on it to display a context menu that in case of the picture control contains the elements included in this page: Picture Control Overview
From this meu you can navigate into CVI help to locate the informations you need: in this case open Programming with Picture Controls and you will see how to load an image into the control.
This applies to every object you can put on a panel and is a very useful feature that I myself continue to use after many years working with CVI.
07-04-2022 08:36 AM
Okay I see, I tried to do it with the DisplayImageFile but the program break and it says that the function return -95, it's "file access permission denied" I don't really know what that means.. my image is a .png file, i saw on an other question in this forum that the DisplayImageFunction can have a .png image
07-04-2022 08:44 AM
File access permission denied error has nothing to do with the picture control: it rather refers to the program being unable to access the file, either because it is locked by another program or because there is a problem in permissions to the file. Are you able to open the file e.g. in Paint when the program fails to do so?
07-04-2022 08:49 AM
Okay and yes I'm able to open the image with Paint
07-04-2022 08:51 AM
I found the problem ! I had a Openfile that was opening the image , that's why I had the error !
Thanks a lot !