Events missing when input list box into view port, please help, thanks. | developer.brewmp.com Events missing when input list box into view port, please help, thanks. | developer.brewmp.com

Developer

Events missing when input list box into view port, please help, thanks.

Forums:

I try to implement the following feature, put list box and some buttons on viewport then these controls can scrollable.

Problems:
Some events has been eat by viewport, the under-going list box failed to get it, such as EVT_MDL_WIDGETELEM_CLICK, if without viewport, list box can receive this event successfully when click one of the list box item, but failed to get when put it into the view port.

Any guys who has this field programming experience please help me and thanks in advance.

The following is how do I create viewport.

int nErr = IANY_CreateInstance(g_pApplet->m_pIShell, AEECLSID_ViewportWidget, (void**)&m_pViewPortDec);
IDecorator_SetWidget(m_pViewPortDec, (IWidget*)m_pNativeControl);
IWidget_Release((IWidget*)m_pNativeControl);

IWidget* pViewWidget = IDecorator_to_IWidget(m_pViewPortDec);

uint32 nFlag = 0;
IWidget_GetFlags(pViewWidget, &nFlag);
IWidget_SetFlags(pViewWidget, nFlag | VWF_CONSUMETOUCHEVENTS);
IWidget_SetTouchMode((IWidget*)m_pNativeControl, AEEWIDGET_TOUCH_MODE_NEVER);

Hi,
From your code snippet, it appears that you're setting AEEWIDGET_TOUCH_MODE_NEVER on the child of the viewport, so it will not receive touch events. You need to set up the viewport to pass touch events to its child (AEEWIDGET_TOUCH_MODE_CHILD), and make sure the child can receive them.
You may find it helpful to read the sample code for "Enabling Viewport Rubber Banding":
https://brewmobileplatform.qualcomm.com/devnet/docviewer.jsp?method=show...
Thanks,
Sam.

Hi,
From your code snippet, it appears that you're setting AEEWIDGET_TOUCH_MODE_NEVER on the child of the viewport, so it will not receive touch events. You need to set up the viewport to pass touch events to its child (AEEWIDGET_TOUCH_MODE_CHILD), and make sure the child can receive them.
You may find it helpful to read the sample code for "Enabling Viewport Rubber Banding":
https://brewmobileplatform.qualcomm.com/devnet/docviewer.jsp?method=show...
Thanks,
Sam.

Thanks Wood for your reply, I will try to set it as you suggest and debug it again.

Thanks Wood for your reply, I will try to set it as you suggest and debug it again.