I'm using GLUI for user interface. I tried to add Listbox with several items. I could add items like below image, but if I clicked the one of them (None, AAA, BBB). The program was stopped. It looks like accessing NULL data.
The code is as follows: (I didn't to anything in control function)
GLUI *glui = GLUI_Master.create_glui_subwindow(windowID, GLUI_SUBWINDOW_RIGHT); GLUI_Panel *objectEdit = new GLUI_Panel(glui, "Edit"); objectEdit->set_alignment(GLUI_ALIGN_LEFT); GLUI_Listbox *listboxChangeSimplification = new GLUI_Listbox(objectEdit, "Change Simplification: ", &listboxIndex, 12, control_cb); listboxChangeSimplification->set_alignment(GLUI_ALIGN_LEFT); listboxChangeSimplification->add_item(1, "None"); listboxChangeSimplification->add_item(2, "AAA"); listboxChangeSimplification->add_item(3, "BBB");
I just want that if I click the item, the white space item(current is 'None') is converted as selected item.