Jump to content

Multicolumnlistbox


Recommended Posts

Hi:

In your code, each time the event fires, you are re-initializing the input array to nothing. I changed your code so that the re-initialization occurs only once outside the event structure. In this case, you will have to wire the array data line through each of your event cases.

.. I hope this helps

Anthony

Link to comment

No guys, sorry for the bad communication!

I have add a new VI to explai it more clearly.

When you start the VI, you can press on the multicolumn, there appears a itemsymbol. But now, How can i prevent that my output array shift's, when i press at the same place.

For example: I press at index 0, itemsymbol appears at index 0, I press again index 0 to eraese that item, now there appaers at index one an item, how an i prevent this?

Thanks Jeroen

Link to comment
  • 5 months later...

I don't fully understand your question. I downloaded your code and ran it and it seems to behave as I would expect it. When you double click a cell it will add the letter "a" to it, but only for a 6 x 10 grid (because that is what is initialized)

Could you please explain the behavior you are seeing.

Also I noticed your sub VI simply initializes a 2D array of string. For future reference this is built into LabVIEW, right click the "Initialize Array" and say add dimension.

Init2DString.jpg

If you created this VI for some other reason disregard my comment.

Link to comment

QUOTE(hooovahh @ Dec 12 2007, 11:36 PM)

When you want to add The "a" in de last row, he add some rows or he changes the display.

I have also add some code to rewrite the multicolumn listbox. When you disabled that button you can see the "strange" behavior.

To initiliazes a 2D array, your method is much easier.

QUOTE(JDave @ Dec 13 2007, 04:54 AM)

It is not that rows are being added, rather the first row is being reset to the normal height. This seems to occur when the 'Names' property is set. You can reset the height each time you set the 'Names' property. If you see a jitter in the display, you need to insert a "Defer Panel Updates" property. There may be a better way, but I can't see one at the moment.

Also it is unnecessary to set the height multiple times -- the entire row has the same height. Remove the 'For' loop entirely and remove the second 'Height' property in your property node.

post-1519-1197517805.gif?width=400

David

Hey David, the "Defer Panel Updates" property seems not be working.

But you are right when you are saying that the behavior pops up when you write somthing to the property "itemnames"

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.