LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multicolumn listbox value change and mouse up event in one case of event structure

You have a number of problems with your code:

 

  1. Your MCLB is an indicator and you can't change the value of an indicator manually.
  2. You're deleting columns, not rows.
  3. You're looking at the wrong output of the function.
  4. You have a race condition because you're reading the value of the indicator before you know it recieved it. Instead, you should just use the wire coming out of the event structure.
  5. You have a bug in that you delete rows in their original order, but once you delete a row, the rows after it change their index. You should reverse the array and start to delete from the end.
  6. For each row, you're actually deleting N rows. That's another bug. Instead, you should always delete one.
  7. It's not a big deal in this case, but it is inefficient to call the property multiple times in the loop. Instead, you can get the value once outside the loop, pass the data in a shift register and then write it back after the loop.
  8. Your code won't actually do what you think, because if you have Ctrl pressed, as soon as you select an element, it causes a value change event. If you want to delete more than one row, I would suggest adding a special control for that instead of using the value change event on the MCLB or simply handle the value change event one row at a time (change the control's selection mode to 0 or 1 items and a scalar).

 

As for the freezing, you can do that for one column - right click the control and select Visible Items>>Row Headers. You can update this column using a property.

 

Based on the state of this code, I think you should learn more about LV yourself before asking such specific questions. I suggest you try looking at some of these tutorials or talk to NI.


___________________
Try to take over the world!
0 Kudos
Message 11 of 12
(729 Views)

Thanks tst for your reply.

 

Sorry for the late reply. Actually I learned labview by myself. So I know I can't do programming like you professionals. If I stucked somewhere I took help either from discussion forums or from labview tutorials. So now onwards I will definitely remember these points before posting to forums. 

 

I will again change my VI as per your suggestions and get it back if I got stuck. 

 

Thanks & Regards,

Manisha

0 Kudos
Message 12 of 12
(707 Views)