capturing double click in PtList

I have a list set up, that gets populated. What I want to do, is if someone
doubleclicks on one of the list items it will go off and do something else
related to the item I have selected.
Only problem is I am having a problem capturing the double click.
I have tried using the PhPointerEvent_t->click_count, but this is giving me
the number of characters in the line of the item I click, and not the click
count like I was trying to get.
I tried setting a raw cb Ph_Event_But_Repeat, but that doesn’t seem to be
working at all.
I then put a Raw widget over the list and made it invisible except it would
see clicks on it. It handles a But_Press fine, but again the But_Repeat
doesn’t want to do anything. And again trying to use the PointerEvent
structure to get the click count, always gives me an 8, no matter if I just
click it or double click it.
Any help here would be appreciated.

Thank you,
Ben Burns

Add a Pt_CB_LIST_INPUT callback and use the below code snippet to
determine if the event was due to a double click.


if (cbinfo->event->type == Ph_EV_BUT_PRESS)
{
PhPointerEvent_t *pev = (PhPointerEvent_t *) PhGetData(cbinfo->event);

if (pev && pev->click_count == 2)
printf(“Double Click\n”);
}

Brian


Brian Edmond (briane@qnx.com)
Software Development
QNX Sotware Systems Ltd.


Ben Burns wrote:

I have a list set up, that gets populated. What I want to do, is if someone
doubleclicks on one of the list items it will go off and do something else
related to the item I have selected.
Only problem is I am having a problem capturing the double click.
I have tried using the PhPointerEvent_t->click_count, but this is giving me
the number of characters in the line of the item I click, and not the click
count like I was trying to get.
I tried setting a raw cb Ph_Event_But_Repeat, but that doesn’t seem to be
working at all.
I then put a Raw widget over the list and made it invisible except it would
see clicks on it. It handles a But_Press fine, but again the But_Repeat
doesn’t want to do anything. And again trying to use the PointerEvent
structure to get the click count, always gives me an 8, no matter if I just
click it or double click it.
Any help here would be appreciated.

Thank you,
Ben Burns

Brian,
Thanks a lot, that did the trick.

Ben

“Brian Edmond” <briane@qnx.com> wrote in message
news:3C5EAED0.9000102@qnx.com

Add a Pt_CB_LIST_INPUT callback and use the below code snippet to
determine if the event was due to a double click.


if (cbinfo->event->type == Ph_EV_BUT_PRESS)
{
PhPointerEvent_t *pev = (PhPointerEvent_t *) PhGetData(cbinfo->event);

if (pev && pev->click_count == 2)
printf(“Double Click\n”);
}

Brian


Brian Edmond (> briane@qnx.com> )
Software Development
QNX Sotware Systems Ltd.


Ben Burns wrote:

I have a list set up, that gets populated. What I want to do, is if
someone
doubleclicks on one of the list items it will go off and do something
else
related to the item I have selected.
Only problem is I am having a problem capturing the double click.
I have tried using the PhPointerEvent_t->click_count, but this is
giving me
the number of characters in the line of the item I click, and not the
click
count like I was trying to get.
I tried setting a raw cb Ph_Event_But_Repeat, but that doesn’t seem to
be
working at all.
I then put a Raw widget over the list and made it invisible except it
would
see clicks on it. It handles a But_Press fine, but again the But_Repeat
doesn’t want to do anything. And again trying to use the PointerEvent
structure to get the click count, always gives me an 8, no matter if I
just
click it or double click it.
Any help here would be appreciated.

Thank you,
Ben Burns



\