jehobj Posted August 16, 2004 Report Share Posted August 16, 2004 I'm trying to use a multicolumn listbox for a sequence of tests to gather the appropiate amount of data to put in a report later on. I would like to use the listbox highlight to indicate which step I'm computing, but I cannot find a way to change the highlight programmatically. In other words; I would like to make the highlights running down the listbox. Isn't that possible at all ??? Regards JeHoB Quote Link to comment
James McAnanama Posted August 16, 2004 Report Share Posted August 16, 2004 JeHoB, You need to use a local variable for the listbox. Just feed it an array of indices to highlight (if more than one highlighted, make sure your selection property is set for 1 or more). See example - one highlights one and only one, the other adds another to the selected bunch per iteration. Cheers, James Download File:post-365-1092684380.vi Quote Link to comment
nly100032 Posted September 20, 2006 Report Share Posted September 20, 2006 hi im trying to set up data acquisition inside a loop that feeds it info like sample period and frequency. So for example you have three time intervals, each with their own sample period and frequency. I am very new to Labview but am thinking this may be possible using a multicolumn listbox with a row for each time interval. how do you reference to cetain elements of a listbox, or is this not the way i should be doing it? thanks very much, andrew Quote Link to comment
crelf Posted September 20, 2006 Report Share Posted September 20, 2006 The datatype of the listbox should give you a clue - it's an integer, and all you need to do is pipe in a number to select the row to be highlighted: Download File:post-181-1158750468.vi Quote Link to comment
Mike Ashe Posted September 20, 2006 Report Share Posted September 20, 2006 Well, you certainly *can* do it that way, as crelf's example shows, now as to the question as to whether you *should* ... From a programming standpoint you probably ought to use an array of your different settings, perhaps in a cluster, each cluster having sample period, frequency, etc, unless there is a compelling reason for displaying this information to your operators. If you have fixed time intervals you can set this up with a timed loop or in hardware in your DAQmx settings. Do you have an example of your upper level VI that you could post? We could offer some more specific advice that way. Quote Link to comment
nly100032 Posted September 21, 2006 Report Share Posted September 21, 2006 thanks alot both of you - the reason for displaying everything is that theyre going to be user input ie not constant. the vi posted (as an image not the attached file) by crelf is exactly the lines along which i was thinking. within the for loop that is shown there will be some form of data acquisition that will take values from the row of the listbox currently selected. however if I set the listbox to take in the loop number so as to highlight a row, then I dont know if I can also take the info in that row and pass it to the daq inside that loop. my overall aim is to set up a vi where user types in the length of 5 time intervals, the frequency of data reading (ie every 30 seconds) in each interval, the sample period (ie for 2 seconds every time) in each interval. i really am extremely new to labview and am under some pressure to produce - a bit lost at the moment! thanks for all the help, really appreciated andrew 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.