1 Replies - 392 Views - Last Post: 08 May 2012 - 11:50 AM Rate Topic: -----

#1 Criel  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 136
  • Joined: 11-March 11

Would an array work best here?

Posted 08 May 2012 - 11:21 AM


I'm looking for some suggestions on what would be best for the situation.

There are 8 line items in a listview that the user can turn on or off with radio buttons while selecting what line(s) they want to turn off/on.

What I'm wondering about is for messaging purposes later after a button is clicked, I would need to know which line(s) were turn on or off, I was thinking about getting the values of what is on or off once the window loads and put it into a list or arraylist then get the values again after the user turns on or off certain lines then compare the before and after list/arraylist and pull out the values that are different from each other. Is this possible to do?

Is This A Good Question/Topic? 0
  • +

Replies To: Would an array work best here?

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1726
  • View blog
  • Posts: 5,696
  • Joined: 25-September 09

Re: Would an array work best here?

Posted 08 May 2012 - 11:50 AM

If you used the .Tag property when you stored the items as I suggested in your other post, You could set the tag to be changed or unchanged. Then when you want to know what was changed you could iterate through the listview and everytime the .Tag is "Changed" you could respond to it.

This way if a user click an item. It is marked changed. If they again click that item you could check to see if it is "Changed" and if so, change it back to UnChanged since it back to what it originally was.

Actually, instead of a text in the tag. Just set it to False and set it to True when a change occurs.

This way, to set it you can use

ListView1.FocusedItem.Tag = Not Cbool(ListView1.FocusedItem.Tag)

Which will act like a toggle. Same concept, just a quicker way of toggling the change.

This post has been edited by CharlieMay: 08 May 2012 - 11:59 AM

Was This Post Helpful? 2
  • +
  • -

Page 1 of 1