PRInt32 inxs[] = {0,2,4};
nsEventStatus PR_CALLBACK MultiListBoxTestHandleEvent(nsGUIEvent *aEvent){  nsIButton * btn;  if (gMultiListBox == nsnull || aEvent->message != NS_MOUSE_LEFT_BUTTON_UP) {    return nsEventStatus_eIgnore;  }  nsString str("Multi-ListBox");  fprintf(gFD, "\nVisually tested Multi-List Box\n");  if (NS_OK == aEvent->widget->QueryInterface(kIButtonIID, (void**)&btn)) {    nsAutoString strBuf;    btn->GetLabel(strBuf);    char * title = strBuf.ToNewCString();    //fprintf(gFD, "Title is [%s]\n", title);    PRUint32 actualSize;     if (!strcmp(title, kSetSelection)) {      gMultiListBox->Deselect();      PRInt32 inxs[] = {0,2,4};      PRInt32 len = 3;      int i;      for (i=0;i<len;i++) {        gMultiListBox->SelectItem(2);//inxs[i]);      }      fprintf(gFD, "\tTested SelectItem()\n");      str.Append(" should show 'List Item 0,2,5'");      statusText->SetText(str,actualSize);      gFailedMsg = "Multi-List::SelectItem";    } else if (!strcmp(title, kSetSelectedIndices)) {      PRInt32 inxs[] = {0,2,4};      PRInt32 len = 3;      gMultiListBox->SetSelectedIndices(inxs, 3);    } else if (!strcmp(title, kRemoveSelection)) {      nsString item2("Multi List Item 2");      PRInt32 inx = gMultiListBox->FindItem(item2, 0);      if (inx > -1) {        gMultiListBox->RemoveItemAt(inx);      }      fprintf(gFD, "\tTested FindItem(...)\n");      str.Append(" should show 0,5");      statusText->SetText(str,actualSize);      gFailedMsg = "Multi-List::FindItem && RemoveItemAt";    }    delete[] title;    //NS_RELEASE(btn);  }  return nsEventStatus_eIgnore;}