Am 14.08.2007 um 15:59 schrieb Fredrik Modéen:
Am 14.08.2007 um 14:38 schrieb Fredrik Modéen:thanks that helpt #2 :) Are you any good on BPopupMenu? I have a derived BListView where I with MouseDown shows a popupmenu but I can't catch/find the message sent from that menu. In the derived BListViewI have MessageReceived and I have that in that's parent Window as wellbut no message.BMenu::SetTargetForItems(BHandler *handler) should do the trick.like this? This are from the derived BListView constructor. popupmenu = new BPopUpMenu("Torrent");popupmenu->AddItem(new BMenuItem("Get Info", new BMessage (TR_INFO), 'I',B_COMMAND_KEY)); popupmenu->FindItem(TR_INFO)->SetEnabled(false); popupmenu->AddSeparatorItem(); popupmenu->AddItem(new BMenuItem("Resume", new BMessage(TR_RESUME))); popupmenu->AddItem(new BMenuItem("Pause", new BMessage(TR_PAUSE))); popupmenu->AddItem(new BMenuItem("Remove", new BMessage(TR_REMOVE))); popupmenu->SetTargetForItems(new BHandler("test")); Didn't work.Have MessageReceived derived in the app class windows class and BListViewclass but no message are passed.
Yes, except replace "new BHandler(...)" with the pointer to your window. - Michael