LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control image file (jpg, bmp)

Hi all

Currently I have one jpg file and one bmp file.. I wanna control both of the picture.. like when the condition is TRUE it will display jpg file and hide the bmp file, if the condition is FALSE will be otherwise... THANKS!!
0 Kudos
Message 1 of 2
(2,995 Views)

If you can load both images on the UIR when you develo the application (i.e. they are not too big) you could use a picture ring control associating the values 0 (False) and 1 (True) to them according to your needs. Simply using SetCtrlVal (panel, control, 0 (or 1)) will display the right image and hide the other.

If you need to load images at run-time you can load them using InsertListItem (panel, control, index, "image_pathname", value). Again, assign 0 or 1 according to your needs.

If you prefere to have only one image loaded in memory at a time, you can use a simple picture control instead of a ring and load the desired image with DisplayImageFile command.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(2,989 Views)