Not getting double click event on a List

AshMcConnell

03-11-2010 13:04:10

Hi Folks,

Has anyone had this problem before? I am trying to doubleclick on the list of players in order to mention them in a chat box.

_driverList->eventMouseButtonDoubleClick = MyGUI::newDelegate(this, &HudMenu::driverListDoubleClicked);

void HudMenu::driverListDoubleClicked(MyGUI::Widget* _sender){
buttonClicked(_mentionChatButton);
}


I am able to select items on the _driverList, so it is in focus, not sure why I am not getting double click messages.

Thanks for your help
All the best,
Ash

Altren

03-11-2010 13:33:14

This is specific of MyGUI events system, events from subwidgets are not raised to parent.
For all complex widgets you should use widget specific events, for example in your case I think you need
/** Event : Enter pressed or double click.\n
signature : void method(MyGUI::List* _sender, size_t _index)\n
@param _sender widget that called this event
@param _index of selected item
*/
EventPair<EventHandle_WidgetSizeT, EventHandle_ListPtrSizeT>
eventListSelectAccept;

AshMcConnell

03-11-2010 14:27:01

Ah OK, thanks Altren that works as expected :)

All the best,
Ash