LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Picture Ring

Solved!
Go to solution

Hi miu,

That code will not run now. You will have to implement same idea in your code. Item list would be names of all items.

You may be having list of it. So that user can replace any image.

Idea is like this, You have a folder now which contains current images of food items. Now you/user want to add new image for a particular item.

So he will cal this vi say on a button event. He will select item for which he has new image. Then he will have to select new image path.

when he will click "change" button then old file will be replaced bye new one.

Now you got it?

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 21 of 35
(1,372 Views)

Hi Gak,

 

Yes I get the whole idea now. But do I have to create some sort of a list first to store the names of  the pictures of all the food items before I use the program that you'd given me? And if I do have to create a list, what kind of method can I use to create the list?

Can I just enter the names of all the picture food items using the same method that you did by using the"Item List" method? Will it work?

 

Miu

0 Kudos
Message 22 of 35
(1,364 Views)

You don't have list of items?

You can use text file or excel to list down.Then read that file and give strings array to "strings[]" property of text ring.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 23 of 35
(1,358 Views)

Hi Miu,

 

for the list of items you could even use the filenames of the pictures. Just list the folder...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 24 of 35
(1,350 Views)

Hi Miu,

 

I have a feeling that you missed something in gak's example.

At the beginning, you were using a picture ring, but that didn't do the trick because you needed to add a picture for every item you needed.

 

Then, Gak proposed to use an image indicator, and to browse an image folder in order to find the needed picture without having to create a customized control and to be really flexible with importing new images as you wish.

 

But if we look at your last screenshot, you finally use custom OK controls with replaced frames by pictures. I think you can't understand what Gak is explaining if you don't use his solution (wich is probably the best by the way). You should probably take a closer look at his example, spend some time to really understand what it does, and you'll probably find the answer to your problem.

 

Regards,

Olivier L. | Certified LabVIEW Developer


Message 25 of 35
(1,342 Views)

Thanks Olivier L to highlight this point...I actually did not notice what he has done...Smiley Sad

I thought he has taken previous reference.

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 26 of 35
(1,333 Views)
Hi Oliver and Gak, Please do not worry because I did use the image indicator method which Gak has taught me earlier. The picture which I pasted with the "customize button" method was only one of the other applications that I had. So I understand what Gak has been saying all the while. The picture which I attached earlier on with my front panel and a 3 pictures of food items was done this way because the user has to select his/her food by clicking on those pictures itself, which are actually OK Buttons. That is why I chose to customize the OK Buttons to pictures that manner because those pictures have to be there all the time. In other words, they are just OK Buttons with pictures attached that's all. My problem now is that I have to think of a way to allow the user (stall owner) to configure and change his pictures as and when he wants to, without having to buy the labview license after I have converted my program to an EXE file. But since I'm using this "customize button" method here, I don't know how I can actually implement the solution Gak has just given me since for this part, I didn't use the "image indicator" method... Just to clarify, do you still think that it's possible to use the solution Gak has just given me for this part if I continue using the "customize button" method? Miu
0 Kudos
Message 27 of 35
(1,326 Views)

My solution will not work with customize button.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 28 of 35
(1,322 Views)

Hi Miu,

 

just to clarify: You cannot use the "customize button" method at VI (or EXE) runtime!

 

So use an image indicator as pointed out several times!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 29 of 35
(1,317 Views)

" user has to select his/her food by clicking on those pictures itself" ...You can do it with picture control as well.

You can track event on picture control. Mouse click event.

And you can implement functionality of changing picture as well with the solution I just posted as an answer.

Don't you think so?

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 30 of 35
(1,314 Views)