if(vector_elements.size())
{
for(int i =0;i<vector_elements.size();i++)
{
text2 = new wchar_t[strlen(vector_elements[i].c_str()) + 1];
mbstowcs(text2, vector_elements[i].c_str(), strlen(vector_elements[i].c_str()) + 1);
listbox->addItem(text2);
}
}
everything is ok as it adds the items just that only the first is selectable... as in the others are disabled.
Do you have any ideea why does this happen?
I don't know the cause of your problem, I'm looking at the code in CGUIListBox.cpp and I don't see anything that allows the items to be 'disabled'. There is an override color per item that can be enabled or disabled, but I see nothing that disallows selection of items.
I do know that you are leaking memory... You allocate a wchar_t array on the heap, but never deallocate it.