PJM_labview Posted February 5, 2008 Report Share Posted February 5, 2008 I remember attending a presentation last year (or the year before) at NI week talking about the example finder. The code is written in LabVIEW (if I remember correctly). I was wondering is someone know how to get to that multiple column list box (or tree or table) that allow for multiple glyphs columns (see image below)? Thanks PJM Quote Link to comment
MikaelH Posted February 6, 2008 Report Share Posted February 6, 2008 It would be good if the "Item Symbol" property can take a 2D array like this: ..and maybe this is available with a hidden property. I guess you have to solve it something like this: Download File:post-941-1202176453.vi Cheers, Mikael Quote Link to comment
PJM_labview Posted February 6, 2008 Author Report Share Posted February 6, 2008 QUOTE(MikaelH @ Feb 4 2008, 05:54 PM) It would be good if the "Item Symbol" property can take a 2D array like this: ..and maybe this is available with a hidden property. Yes, this could be nice to have 2D array for symbols, but I am suspecting that this might not be how this has been implemented. As you say, this table/MCL/Tree might be available through scripting. I will have to investigate. Since the example finder has been build as an executable, it has used this MCL which support multi glyph columns. The first LV version that shipped with the executable example finder was LV 7.0, so this would be cool if NI could let us use this (since this has been around for quite sometime now). QUOTE(MikaelH @ Feb 4 2008, 05:54 PM) I guess you have to solve it something like this: http://lavag.org/old_files/post-941-1202176453.vi'>Download File:post-941-1202176453.vi Cheers, Mikael Yes, I have done it in a similar fashion in the past, and this work fairly well as long as you don't expect the user will want to resize the column. PJM Quote Link to comment
Jim Kring Posted February 6, 2008 Report Share Posted February 6, 2008 QUOTE(PJM_labview @ Feb 5 2008, 09:25 AM) Yes, I have done it in a similar fashion in the past, and this work fairly well as long as you don't expect the user will want to resize the column. Hmmm... the NI Example Finder window cannot be resized. Quote Link to comment
JDave Posted February 6, 2008 Report Share Posted February 6, 2008 QUOTE(Jim Kring @ Feb 5 2008, 03:14 PM) Hmmm... the NI Example Finder window cannot be resized. But you are allowed to resize the columns, which moves the glyphs... Quote Link to comment
PJM_labview Posted February 7, 2008 Author Report Share Posted February 7, 2008 Which is what I meant by "resizing column". Quote Link to comment
PJM_labview Posted February 12, 2008 Author Report Share Posted February 12, 2008 I have made some progress on that front. I extract that control from the example finder (this turn out to be a MCL listbox). Here is the control: Download File:post-121-1202760621.vi Now I have to figure out how to change these glyphs. For info, here is a screenshot of NI VI interface that manage the listbox (Mikael, you might have been onto something with the 2d array of glyphs). Any feedback will be greatly appreciated. PJM Quote Link to comment
Francois Normandin Posted February 12, 2008 Report Share Posted February 12, 2008 Hi PJM, The key is in the item symbol number. They start at 1000 and there are 141 of them. Select the active cell to change which column you're working on. Quote Link to comment
PJM_labview Posted February 12, 2008 Author Report Share Posted February 12, 2008 Thanks :thumbup: PJM Quote Link to comment
Jim Kring Posted February 12, 2008 Report Share Posted February 12, 2008 Custom item symbols works, too! Woohoo! :thumbup: Quote Link to comment
Ton Plomp Posted February 13, 2008 Report Share Posted February 13, 2008 QUOTE(normandinf @ Feb 11 2008, 09:39 PM) *************** EDITED IMAGE, after Jim's post, I added the custom icons ****************************** It looks like you use a tree control and address this as an MCL, is that right? Or is the name not updated for the control type? Ton Quote Link to comment
Francois Normandin Posted February 13, 2008 Report Share Posted February 13, 2008 QUOTE(tcplomp @ Feb 12 2008, 12:34 AM) It looks like you use a tree control and address this as an MCL, is that right?Or is the name not updated for the control type? Ton It is very similar to tree control, but only because most of the methods and properties look alike. I only used MCL control type, no type casting needed. The difference between these two typecasts is that the tree control gives you much more ease of use in icon management. You can hide/show each icon individually identified to a particular tag name. The MCL allows for a whole list of icons to be shown quickly rather than individually controlled. http://lavag.org/old_files/monthly_02_2008/post-10515-1202824855.jpg' target="_blank"> 1 Quote Link to comment
PJM_labview Posted February 13, 2008 Author Report Share Posted February 13, 2008 Now that I got all the pieces together I am finally able to write UI like the one below. This MCL will really come in handy in many situations. Thanks everyone for all the feedbacks. PJM Quote Link to comment
Ton Plomp Posted February 14, 2008 Report Share Posted February 14, 2008 QUOTE(PJM_labview @ Feb 13 2008, 02:17 AM) Now that I got all the pieces together I am finally able to write UI like the one below. This MCL will really come in handy in many situations. Looks very nice PJM, the 'treeing', is some routine you have to do for yourself? Ton Quote Link to comment
PJM_labview Posted February 14, 2008 Author Report Share Posted February 14, 2008 QUOTE(tcplomp @ Feb 12 2008, 09:34 PM) Looks very nice PJM, the 'treeing', is some routine you have to do for yourself? Yes, but this is very easy. The Item Symbol Index has to change according to this formula: Item Symbol Index = Orginal Item Symbol Index + Indent Level * 65536 Example: If you have this glyph ( http://lavag.org/old_files/monthly_02_2008/post-121-1202921719.png' target="_blank">), which has and index value of 14, and you want an indentation level of 2 then you set this Item Symbol at 131086 (which is 14 + 65536 x 2).PJM Quote Link to comment
Yair Posted February 14, 2008 Report Share Posted February 14, 2008 Can anyone please backsave the code (or at least the control) to 7.0? Quote Link to comment
JDave Posted February 14, 2008 Report Share Posted February 14, 2008 QUOTE(PJM_labview @ Feb 12 2008, 05:17 PM) Now that I got all the pieces together I am finally able to write UI like the one below. http://lavag.org/old_files/monthly_02_2008/post-121-1202865384.png' target="_blank"> This MCL will really come in handy in many situations. Thanks everyone for all the feedbacks. PJM This does look very nice and promising. I'm glad you were able to extract it. Quote Link to comment
PJM_labview Posted February 15, 2008 Author Report Share Posted February 15, 2008 QUOTE(Yen @ Feb 13 2008, 12:03 PM) Can anyone please backsave the code (or at least the control) to 7.0? Here it is in 7.0. http://lavag.org/old_files/post-121-1202974163.vi'>Download File:post-121-1202974163.vi PJM Quote Link to comment
Yair Posted February 15, 2008 Report Share Posted February 15, 2008 Thanks. Unfortunately, 7.0 doesn't have the methods for importing custom images, but this is also nice. Quote Link to comment
Jim Kring Posted February 15, 2008 Report Share Posted February 15, 2008 QUOTE(Yen @ Feb 14 2008, 10:40 AM) Thanks. Unfortunately, 7.0 doesn't have the methods for importing custom images, but this is also nice. I don't think that 7.1 has custom symbols either. PJM's cool UI example is written in 8.2. (I know, because I got to play with it :thumbup: ) Quote Link to comment
Ton Plomp Posted April 11, 2008 Report Share Posted April 11, 2008 I tried to do something similar, have a first column with symbols+names, and a second column with symbols only. The following code failed: QUOTE (normandinf @ Feb 12 2008, 03:01 PM) I only used MCL control type, no type casting needed.The difference between these two typecasts is that the tree control gives you much more ease of use in icon management. You can hide/show each icon individually identified to a particular tag name. The MCL allows for a whole list of icons to be shown quickly rather than individually controlled. I can't easily spot the difference. QUOTE (PJM_labview @ Feb 11 2008, 09:12 PM) Now I have to figure out how to change these glyphs. For info, here is a screenshot of NI VI interface that manage the listbox (Mikael, you might have been onto something with the 2d array of glyphs). Where can I find this 70....... VI? QUOTE (PJM_labview @ Feb 13 2008, 02:17 AM) Now that I got all the pieces together I am finally able to write UI like the one below. This MCL will really come in handy in many situations. $10 for the correct answer (well for LAVA). Ton PS is quoting of an image prohibited? Quote Link to comment
PJM_labview Posted April 11, 2008 Author Report Share Posted April 11, 2008 QUOTE (tcplomp @ Apr 10 2008, 11:48 AM) Where can I find this 70....... VI? Well, this VI came from inside an old example finder executable. It has no BD no FP and no icon, so it is of very little value if you plan to use it. I was just trying to figureout, at the time, how NI did the multi clumn glyph and I though this could have helped to have this VI Interface. About why your example code fail, well it look like you are targeting only one column (the [-2;1]), if I recall you have set the active column first then set the glyphs (repeat for each column). PS: Now, go give your $10 to LAVA PJM Quote Link to comment
Francois Normandin Posted April 11, 2008 Report Share Posted April 11, 2008 QUOTE (tcplomp @ Apr 10 2008, 02:48 PM) I can't easily spot the difference. Well, I can't say there is a difference either. I can even reproduce your error! I compared a new MCListbox with the one in PJM's VI and I get two different results... I can see from the coercion dots that they're not the same type. That seems a clue. However, I haven't found yet what's the difference. Hopefully, a good night of labview dreams will get me on track. Download File:post-10515-1207863359.vi (version 8.5) Quote Link to comment
orko Posted April 11, 2008 Report Share Posted April 11, 2008 QUOTE (normandinf @ Apr 10 2008, 02:38 PM) Well, I can't say there is a difference either. I can even reproduce your error!I compared a new MCListbox with the one in PJM's VI and I get two different results... I can see from the coercion dots that they're not the same type. That seems a clue. However, I haven't found yet what's the difference. Hopefully, a good night of labview dreams will get me on track. Perhaps an even bigger clue is the fact that your MCL is an integer and his is an array of integers... Quote Link to comment
Francois Normandin Posted April 12, 2008 Report Share Posted April 12, 2008 QUOTE (orko @ Apr 10 2008, 06:33 PM) Perhaps an even bigger clue is the fact that your MCL is an integer and his is an array of integers... It does take care of the coercion dots but putting both of them "Scalar" doesn't solve the problem that the icons are not displayed on the second column of the left listbox... 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.