Farid2010 Posted August 20, 2010 Report Share Posted August 20, 2010 I want to creat a drop down menu which user can select a picture among different pictures. I am wondering how can i put pictures insted of words in a drop down menu? I would appreciate if you could give me your advise. Attached file is the image of drop menu i want to create in labview. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted August 20, 2010 Report Share Posted August 20, 2010 I want to creat a drop down menu which user can select a picture among different pictures. I am wondering how can i put pictures insted of words in a drop down menu? I would appreciate if you could give me your advise. Attached file is the image of drop menu i want to create in labview. have you concidered using a Picture Ring? Ben Quote Link to comment
Farid2010 Posted August 20, 2010 Author Report Share Posted August 20, 2010 have you concidered using a Picture Ring? Ben Yes, I tried picture Ring ,but the issue is that the items(images) are changed one by one and i couldn't make it like what it is shown in attached image ( all images are visible and user can select one among them) Quote Link to comment
smenjoulet Posted August 20, 2010 Report Share Posted August 20, 2010 Yes, I tried picture Ring ,but the issue is that the items(images) are changed one by one and i couldn't make it like what it is shown in attached image ( all images are visible and user can select one among them) You were probably clicking the increment/decrement (up/down) arrows for the ring control. Just try clicking on the picture itself. You will get a thumbnail of each picture and you can select the one you want. If you're expecting it to look like the picture you posted, i think you'll be disappointed. If you want that, you'll have to do a bit more work with either a picture control (not picture ring) or an XControl. If you're on Windows, you might also be able to find an ActiveX or .Net control that would work. -Scott 1 Quote Link to comment
Farid2010 Posted August 23, 2010 Author Report Share Posted August 23, 2010 You were probably clicking the increment/decrement (up/down) arrows for the ring control. Just try clicking on the picture itself. You will get a thumbnail of each picture and you can select the one you want. If you're expecting it to look like the picture you posted, i think you'll be disappointed. If you want that, you'll have to do a bit more work with either a picture control (not picture ring) or an XControl. If you're on Windows, you might also be able to find an ActiveX or .Net control that would work. -Scott [/quote Thanks Scott. yes by clicking on the every picture it shows all pictures in very small scale and in hozizental direction which is quite different from what i need. Also do you know why it is not possible to change numeric indicator's size VERTICALLY? It only could be resized horizentally!!! Farid Quote Link to comment
Grampa_of_Oliva_n_Eden Posted August 23, 2010 Report Share Posted August 23, 2010 Also do you know why it is not possible to change numeric indicator's size VERTICALLY? It only could be resized horizentally!!! Farid Font size Ben Quote Link to comment
Farid2010 Posted August 23, 2010 Author Report Share Posted August 23, 2010 Also do you know why it is not possible to change numeric indicator's size VERTICALLY? It only could be resized horizentally!!! Farid Font size Ben Thank you so much Ben! Quote Link to comment
Farid2010 Posted September 14, 2010 Author Report Share Posted September 14, 2010 (edited) Regarding my last question, I could make the picture drop down using "pict ring", but what i exactly need to make is a combined drop down menu showing in my sample file.i am confused how to make it. Does anybody know how i can make it? i attach the new sample file Edited September 14, 2010 by Farid2010 Quote Link to comment
MViControl Posted September 27, 2010 Report Share Posted September 27, 2010 Regarding my last question, I could make the picture drop down using "pict ring", but what i exactly need to make is a combined drop down menu showing in my sample file.i am confused how to make it. Does anybody know how i can make it? i attach the new sample file May be XControl is a good way to realize it. Quote Link to comment
Farid2010 Posted September 29, 2010 Author Report Share Posted September 29, 2010 Thanks but i don't know how to make it. Do you have any example file? May be XControl is a good way to realize it. Quote Link to comment
Michael Aivaliotis Posted September 30, 2010 Report Share Posted September 30, 2010 I have a feeling that what you are trying to do is more advanced than what your experience can handle. However, this is how we all learn right? An XControl won't help you. An XControl is just a nice package. You still have to figure out how to do what you want. Once you figure that out, you can then create an XControl out of it if you want, but not necessary. I could probably implement what you want in pure LabVIEW using 2 picture controls and some other tricks, so it's definitely doable. But it's not something you can do in 5 minutes. I suggest you study up on picture controls. Another consideration is that you might want to change your design. You can probably use an array of picture controls which allows you to scroll through the images. Then when you hover over the one image you can overlay another array of images slightly shifted to the right. Many creative ways to do this but not easy. Quote Link to comment
ShaunR Posted September 30, 2010 Report Share Posted September 30, 2010 The problem is we are pretty much stuck with the controls we are given. As we don't have access to the control canvas and the "OnRedraw" event, we cannot change the control (with the exception of a few cosmetics). Everything we do to get around it is really a kludge and not for the faint of heart. You are probably better off finding an Active X or .NET control tat supports images and using that. Quote Link to comment
Farid2010 Posted September 30, 2010 Author Report Share Posted September 30, 2010 Thank you guys. as michael said i have not that much experience but i m trying to either make my project and also learn labview. it's hard but i ma really interested . I have to read more about xcontol and picture controls. The problem is we are pretty much stuck with the controls we are given. As we don't have access to the control canvas and the "OnRedraw" event, we cannot change the control (with the exception of a few cosmetics). Everything we do to get around it is really a kludge and not for the faint of heart. You are probably better off finding an Active X or .NET control tat supports images and using that. Quote Link to comment
Francois Normandin Posted September 30, 2010 Report Share Posted September 30, 2010 Thank you guys. as michael said i have not that much experience but i m trying to either make my project and also learn labview. it's hard but i ma really interested . I have to read more about xcontol and picture controls. This won't do the cascading effect, but you can have a quick look at how you could use a simple array of pictures with events to act as a drop-down picture ring. PictRing.vi 1 Quote Link to comment
Farid2010 Posted September 30, 2010 Author Report Share Posted September 30, 2010 Thanks francois, but when i run it and browse to select the directory in which images are, it doesn't select!! This won't do the cascading effect, but you can have a quick look at how you could use a simple array of pictures with events to act as a drop-down picture ring. PictRing.vi Quote Link to comment
Francois Normandin Posted September 30, 2010 Report Share Posted September 30, 2010 Thanks francois, but when i run it and browse to select the directory in which images are, it doesn't select!! Select the directory before running the VI. You can check on startup (init frame) and add a browse for directory primitive from the File IO palette. Quote Link to comment
Farid2010 Posted October 1, 2010 Author Report Share Posted October 1, 2010 I tried again but still when i browse to select a directory which contains my pictures,either in non-executing mode and executing mode! it does not select the directory. could u double check the file yo sent me? Thanks Select the directory before running the VI. You can check on startup (init frame) and add a browse for directory primitive from the File IO palette. Quote Link to comment
Francois Normandin Posted October 1, 2010 Report Share Posted October 1, 2010 I tried again but still when i browse to select a directory which contains my pictures,either in non-executing mode and executing mode! it does not select the directory. could u double check the file yo sent me? Thanks Did you have any PNG files in the directory? You can change it in the code if you use other formats. Also, I've limited it to the four first file in the folder for the demo, but you can change that in the code. I've changed the code to ask for the folder on startup. <a href="http://content.screencast.com/users/normandinf/folders/Jing/media/6fa447b3-276b-484f-a496-3d3f10261a04/2010-10-01_0905.png"><img'>http://content.screencast.com/users/normandinf/folders/Jing/media/6fa447b3-276b-484f-a496-3d3f10261a04/2010-10-01_0905.png"><img class="embeddedObject" src="http://content.screencast.com/users/normandinf/folders/Jing/media/6fa447b3-276b-484f-a496-3d3f10261a04/2010-10-01_0905.png" width="306" height="284" border="0" /></a> PictRing.vi Quote Link to comment
Farid2010 Posted October 1, 2010 Author Report Share Posted October 1, 2010 Yes I have png files. I tried the new file you just sent. again the same problem. As you see in the image, when i select the folder which contains png files nothing is selected in "file name" section. it doesn't select neither by selecting and hiting open button nor by double click or etc.!!! Did you have any PNG files in the directory? You can change it in the code if you use other formats. Also, I've limited it to the four first file in the folder for the demo, but you can change that in the code. I've changed the code to ask for the folder on startup. <a href="http://content.screencast.com/users/normandinf/folders/Jing/media/6fa447b3-276b-484f-a496-3d3f10261a04/2010-10-01_0905.png"><img'>http://content.screencast.com/users/normandinf/folders/Jing/media/6fa447b3-276b-484f-a496-3d3f10261a04/2010-10-01_0905.png"><img class="embeddedObject" src="http://content.screencast.com/users/normandinf/folders/Jing/media/6fa447b3-276b-484f-a496-3d3f10261a04/2010-10-01_0905.png" width="306" height="284" border="0" /></a> PictRing.vi Quote Link to comment
Francois Normandin Posted October 1, 2010 Report Share Posted October 1, 2010 Yes I have png files. I tried the new file you just sent. again the same problem. As you see in the image, when i select the folder which contains png files nothing is selected in "file name" section. it doesn't select neither by selecting and hiting open button nor by double click or etc.!!! Browse to the folder that contains a list of your images (the usual double-clicks to open the folder). When you see the png files listed, select "Current Folder" at the bottom right. <object id="scPlayer" class="embeddedObject" width="634" height="478" type="application/x-shockwave-flash" data="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/jingh264player.swf" > <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/jingh264player.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/FirstFrame.jpg&containerwidth=634&containerheight=478&content=http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/2010-10-01_0941.mp4&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/" /> <video width="634" height="478" controls="controls"><br /> <source src="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/2010-10-01_0941.mp4" type="video/mp4;" /><br /> <b>Your browser cannot play this video. <a href="http://www.screencast.com/handlers/redirect.ashx?target=viewingembededhelp">Learn how to fix this</a>.</b> </video> </object> Quote Link to comment
Farid2010 Posted October 1, 2010 Author Report Share Posted October 1, 2010 Froncois!Thank you so much for your kind effort. I did exatly what you showed in video. Now it shows this error message after selecting "current folder". I don't know what is wrong!!!! Browse to the folder that contains a list of your images (the usual double-clicks to open the folder). When you see the png files listed, select "Current Folder" at the bottom right. <object id="scPlayer" class="embeddedObject" width="634" height="478" type="application/x-shockwave-flash" data="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/jingh264player.swf" > <param name="movie" value="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/jingh264player.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/FirstFrame.jpg&containerwidth=634&containerheight=478&content=http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/2010-10-01_0941.mp4&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/" /> <video width="634" height="478" controls="controls"><br /> <source src="http://content.screencast.com/users/normandinf/folders/Jing/media/41ae1109-54db-438b-b200-e462ec7e9383/2010-10-01_0941.mp4" type="video/mp4;" /><br /> <b>Your browser cannot play this video. <a href="http://www.screencast.com/handlers/redirect.ashx?target=viewingembededhelp">Learn how to fix this</a>.</b> </video> </object> Quote Link to comment
Francois Normandin Posted October 1, 2010 Report Share Posted October 1, 2010 PNG Test.vi Can you try this test code and tell me if you run into errors? Quote Link to comment
Farid2010 Posted October 1, 2010 Author Report Share Posted October 1, 2010 It didn't show up any error,, PNG Test.vi Can you try this test code and tell me if you run into errors? Quote Link to comment
Francois Normandin Posted October 1, 2010 Report Share Posted October 1, 2010 It didn't show up any error,, As I thought... if PNG's are actually not corrupted. Let's try something else: Can you check where the error is occuring in the code? It works fine in my place, so we've got to find the point where the error is generated. Use execution highlighting. Quote Link to comment
Farid2010 Posted October 1, 2010 Author Report Share Posted October 1, 2010 it does'nt show any error!! but still no picture is shown. here is the image with highlighting execution. As I thought... if PNG's are actually not corrupted. Let's try something else: Can you check where the error is occuring in the code? It works fine in my place, so we've got to find the point where the error is generated. Use execution highlighting. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.