mardi 7 avril 2015

C++ Find a specific item in Windows Form ListView using checkbox

Hi I am new with Windows Form (and programming) and currently using it to create a simple GUI for a school assignment to create a Task Manager. I am using ListView and receive a string of task and their details from Logic (eg. Create proposal]01/03/2015]1200]02/03/2015]1159]done] eat lunch]NULL]NULL]02/03/2015]1200]undone])


the GUI will then separate this string into different task (using while loop) and their components and use them to initialize ListView item: aListViewItem = (gcnew System::Windows::Forms::ListViewItem(gcnew cli::array< System::String^ >(6) { taskTitle, taskStartDate, taskStartTime, taskEndDate, taskEndTime, taskIndex }, -1));


and then print it out as ListView items: listViewDisplay->Items->Add(this->aListViewItem);


It will also see the status (done/undone) and initialize the item's checkbox's value


What I would like to ask is: everytime the user check/uncheck a checkbox, I want to identify the item that user ticked to send a command to the Logic. How do I do this? (Since every item have only temporary name 'aListViewItem' to be printed out then replaced with other task.)


I am sorry if this is not a clear question. Please tell me if you need anything to clarify this question. I am a complete noob and this is my first time creating an app using Visual Studio..


Thank you in advance! :)


Aucun commentaire:

Enregistrer un commentaire