Michael
Michael

Reputation: 157

moving and deleting selected items from check box list

Hi I have a GUI forum with 2 buttons One button adds students to a check list box The other button adds teachers to the same check list box until I have a small summary oif each

What I want to do is when only students are selected or when teachers are selected it moves them to a list box of some kind, maybe another checklist box

If both a student and a teacher is select it should give some sort of error like must only select students or teachers in a message box

Or my other idea If easier to do would the student button will add student to checklist box 1 & 2 And the teacher button would add teacher to checklist box 1 & 3

Then when you select a student or teacher in one the checklist and delete/remove it, it removes them from the other checklists

For example if I select student in checkboxlist 1 and remove it then it will remove the same student in checkbox list 2

Is it possible to do any that? If so what would be the best was or easiest way to code it ? If could give some example code then if be truely grateful

Hopefully what I'm asking is clear enough, I'm sorry if its bit and I hope the way I'm asking the question is correct

Upvotes: 0

Views: 312

Answers (1)

FrostyFire
FrostyFire

Reputation: 3258

When the user clicks the button, have it loop through all the checked values and add them to the other list or delete them.

Upvotes: 1

Related Questions