Michael Aivaliotis Posted February 12, 2007 Report Share Posted February 12, 2007 Some of you have asked how we managed to have alternating row colors in our system Multicolumn Listbox. Here is the process: Open a new blank front panel and place a classic control down. We will use this as a base to create a system control that we can use to programmaticaly change the row colors. Right-click on the control and select Advanced>Customize. Press ctrl+m on your keyboard to switch to customize mode. Open a new blank front panel and place a system control down. We will use this to copy the bits we need to place into the classic control. Right-click on the system control and select Advanced>Customize. Press ctrl+m on your keyboard to switch to customize mode. You should now have two control editors open as shown. Very carfully right click on the border (frame) of the system control in the control editor and select copy to clipboard. It may be easier if you move the frame to the side. Now go over to the classic control and right click on the border (frame) and select import from clipboard at same size. You should now have a classic control with a system frame, cool huh? One tip is that the frame may appear slightly larger than the one in the system control. just resize it a pixel or 2 smaller all the way around. Use the resize objects dialog for more accuracy. Repeat the same process, for the little square box located to the bottom right corner of the system control. The final step is to set the color for the column headers and the grid. To do this use the set color tool from the tools palette and click on the coloumn header. With the palette visible, press the A key on your keyboard. This forces the color selection to apply to the foreground and the background. Now pick the system color. Now we need to implement the code that performs the row coloring. One final note. Row coloring is resource intensive so it's recommended that you use the "Defer Panel Updates" property node on the panel that will host the Multicolumn Listbox. Link to comment Share on other sites More sharing options...
Yair Posted February 12, 2007 Report Share Posted February 12, 2007 Thank you Michael. This board is a very good idea indeed. Link to comment Share on other sites More sharing options...
chrisdavis Posted February 26, 2007 Report Share Posted February 26, 2007 Thanks for the step by step, but this isn't all you are doing to make your MultiColumn Listbox that you use in VIPM. How do you specify the color LabView icon used as the item symbol. Its not in the "listbox symbol constant" avaliable on the pallete. I had heard something about opening the VI that is used in NI's example finder, since it was a "special" MCL and if you knew the right numbers you could get these color symbols. Care to shed some light on your work here? Thanks, Chris Link to comment Share on other sites More sharing options...
Michael Aivaliotis Posted March 4, 2007 Author Report Share Posted March 4, 2007 Thanks for the step by step, but this isn't all you are doing to make your MultiColumn Listbox that you use in VIPM. How do you specify the color LabView icon used as the item symbol. Its not in the "listbox symbol constant" avaliable on the pallete. I had heard something about opening the VI that is used in NI's example finder, since it was a "special" MCL and if you knew the right numbers you could get these color symbols. Care to shed some light on your work here? Thanks, Chris We are using LabVIEW 8.0 for our development of VIPM. LabVIEW 8.0 allows you to define your own glyphs to use in the first column of the MCL. Link to comment Share on other sites More sharing options...
Johan Gustafsson Posted August 6, 2007 Report Share Posted August 6, 2007 Thanks for the walkthrough! I just have one question: When I select a Multicolumn Listbox (not system) in LabView 8.2 (Windows XP) or LabView 8.0 (Windows Vista) I get old style looking scrollbars. Not like the good looking scrollbars with the system version. In the tutorial the scrollbars look the same... Do you have any solution to the difference I am seeing? Thanks, Johan Gustafsson, Sweden Link to comment Share on other sites More sharing options...
Michael Aivaliotis Posted August 14, 2007 Author Report Share Posted August 14, 2007 When I select a Multicolumn Listbox (not system) in LabView 8.2 (Windows XP) or LabView 8.0 (Windows Vista) I get old style looking scrollbars. Not like the good looking scrollbars with the system version. In the tutorial the scrollbars look the same... Do you have any solution to the difference I am seeing? I believe this is because you are selecting a modern MCL, instead of classic. See the differences below? Link to comment Share on other sites More sharing options...
lsjunv Posted August 22, 2007 Report Share Posted August 22, 2007 Would you please explain shortly why we should change the classic MCL from modern MCL in above demonstration? Link to comment Share on other sites More sharing options...
Jim Kring Posted August 22, 2007 Report Share Posted August 22, 2007 Would you please explain shortly why we should change the classic MCL from modern MCL in above demonstration? Because the classic version has system scrollbars, addressing the issue posed by Johan. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.