Multilist events

klumhru

31-07-2008 11:59:53

Hi

Was wondering if there is a trick to getting double click and key pressed to work in multi list?

My definition is like this:


list->eventMouseButtonDoubleClick = MyGUI::newDelegate(this, &GUIListener::listKeys_dblClick);
list->eventKeyButtonPressed = MyGUI::newDelegate(this, &GUIListener::listKeys_keyPress);


The application never enters the delegate functions. Other events (buttons etc) work fine, and I can scroll the list with up/down, scroll etc.

This is the layout file:
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout">
<Widget type="Widget" skin="Panel" position="312 180 400 408" align="ALIGN_CENTER" layer="Back" name="panelOptions">
<Widget type="Tab" skin="Tab" position="8 8 384 344" name="tabOptions">
<Property key="Tab_ButtonWidth" value="120"/>
<Widget type="Sheet" skin="Default" position="8 29 368 308" name="sheetGame">
<Property key="Widget_Caption" value="Game"/>
<Property key="Sheet_Select" value="true"/>
<Widget type="Edit" skin="Edit" position="176 43 184 24" name="txtPlayerName">
<Property key="Widget_Caption" value="Player"/>
</Widget>
<Widget type="StaticText" skin="StaticText" position="8 43 128 24" name="lblPlayerName">
<Property key="Widget_AlignText" value="ALIGN_CENTER"/>
<Property key="Widget_Caption" value="Player name"/>
</Widget>
<Widget type="MultiList" skin="MultiList" position="8 112 352 191" name="listKeys"/>
<Widget type="StaticText" skin="StaticText" position="8 87 176 24" name="listKeys_lblAction">
<Property key="Widget_AlignText" value="ALIGN_HCENTER ALIGN_BOTTOM"/>
<Property key="Widget_Caption" value="Action"/>
</Widget>
<Widget type="StaticText" skin="StaticText" position="192 88 168 23" name="listKeys_lblKey">
<Property key="Widget_AlignText" value="ALIGN_HCENTER ALIGN_BOTTOM"/>
<Property key="Widget_Caption" value="Key"/>
</Widget>
</Widget>
<Widget type="Sheet" skin="Default" position="8 29 368 308" name="sheetVideo">
<Property key="Widget_Caption" value="Video"/>
<Widget type="StaticText" skin="StaticText" position="8 43 120 24" name="lblFullscreen">
<Property key="Widget_AlignText" value="ALIGN_CENTER"/>
<Property key="Widget_Caption" value="Fullscreen"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="176 43 24 24" name="chkFullscreen"/>
<Widget type="ComboBox" skin="ComboBox" position="176 75 184 24" name="ddlReolution"/>
<Widget type="StaticText" skin="StaticText" position="8 75 120 24" name="lblResolution">
<Property key="Widget_AlignText" value="ALIGN_CENTER"/>
<Property key="Widget_Caption" value="Resolution"/>
</Widget>
</Widget>
<Widget type="Sheet" skin="Default" position="8 29 368 308" name="sheetAudio">
<Property key="Widget_Caption" value="Audio"/>
<Widget type="StaticText" skin="StaticText" position="8 43 120 24" name="lblVolume">
<Property key="Widget_AlignText" value="ALIGN_CENTER"/>
<Property key="Widget_Caption" value="Volume"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="176 43 24 24" name="chkVolume"/>
<Widget type="HScroll" skin="HSlider" position="200 43 160 24" name="slideVolume">
<Property key="Scroll_Range" value="100"/>
<Property key="Scroll_Position" value="100"/>
</Widget>
</Widget>
</Widget>
<Widget type="Button" skin="ButtonSmall" position="8 360 112 40" name="btnBack">
<Property key="Widget_Caption" value="Back"/>
<UserString key="" value=""/>
</Widget>
<Widget type="Button" skin="ButtonSmall" position="280 360 112 40" name="btnOk">
<Property key="Widget_Caption" value="OK"/>
</Widget>
</Widget>
</MyGUI>

klumhru

31-07-2008 12:17:14

Sorry, missed the eventListSelectAccept event in the API docs. Working now.

my.name

31-07-2008 13:18:17

=)