Using Tap event coordinates - Palmtop

This is a discussion on Using Tap event coordinates - Palmtop ; Sorry about the crosspost. I don't know these groups well enough to target my question more specifically. I'm trying to find out if there is a way to access the x and y coordinates from the tap event and cancel ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Using Tap event coordinates

  1. Using Tap event coordinates

    Sorry about the crosspost. I don't know these groups well enough to target
    my question more specifically. I'm trying to find out if there is a way to
    access the x and y coordinates from the tap event and cancel the event if
    necessary.

    Assume you have a list object containing the list of bread types below:

    White
    Whole Wheat
    Rye
    Multigrain
    Sourdough
    Russian Black Pareis

    Assume also that the list has a scroll bar and a max of four items
    displayed.

    It is very easy (too easy) for a user to tap the list area when they are in
    fact trying to tap the scroll bar. Is there a way to trap the tap
    coordinates on the list and cancel the event if it is deemed
    (programatically) to be too close to the scrollbar?
    The project is written in C using PODS and PRC-Tools.
    Any assistance would really be appreciated.



  2. Re: Using Tap event coordinates

    Humphrey wrote:
    > Sorry about the crosspost. I don't know these groups well enough to target
    > my question more specifically. I'm trying to find out if there is a way to
    > access the x and y coordinates from the tap event and cancel the event if
    > necessary.
    >
    > Assume you have a list object containing the list of bread types below:
    >
    > White
    > Whole Wheat
    > Rye
    > Multigrain
    > Sourdough
    > Russian Black Pareis
    >
    > Assume also that the list has a scroll bar and a max of four items
    > displayed.
    >
    > It is very easy (too easy) for a user to tap the list area when they are in
    > fact trying to tap the scroll bar. Is there a way to trap the tap
    > coordinates on the list and cancel the event if it is deemed
    > (programatically) to be too close to the scrollbar?
    > The project is written in C using PODS and PRC-Tools.
    > Any assistance would really be appreciated.
    >
    >

    Can't you just make the list object a bit narrower?

    Gareth

  3. Re: Using Tap event coordinates


    "Humphrey" wrote in message
    news:8qKdnW-k6KRD9a_fRVn-hg@wavecable.com...
    >
    > It is very easy (too easy) for a user to tap the list area when they are

    in
    > fact trying to tap the scroll bar. Is there a way to trap the tap
    > coordinates on the list and cancel the event if it is deemed
    > (programatically) to be too close to the scrollbar?
    > The project is written in C using PODS and PRC-Tools.
    > Any assistance would really be appreciated.
    >
    >

    I am a new programmer in the Palm environment. I use C, PRC-Tools, and
    PALM_OS_53_SIMULATOR for my testing. One of the first things I encountered
    is that in your 'event loop' you normally first call on the system, via
    SysHandleEvent(), to let the OS process any event that it knows about. If it
    doesn't handle the event, signified by a FALSE return, then you must handle
    it yourself. However, *before* calling SysHandleEvent() you may examine the
    event yourself and take any action you wish, including (1) processing it,
    (2) throwing it away, or (3) doing nothing so SysHandleEvent() will handle
    it normally.

    So, you could look for a Pen-Down event, which has the coordinates with it,
    determine if they are too close to the scroll-bar, and throw the event away.
    If not too close, then you can use option (3) and pass the event to
    SysHandleEvent(). However, this requires you to know where on the screen the
    scroll bar is located (a slim vertical rectangle) and I don't know how you
    extract this. I haven't used any Palm-provided menus yet.

    HTH



  4. Re: Using Tap event coordinates


    "Gareth Adams" wrote in message
    news:d0ujnv$2ab$2@newsg3.svr.pol.co.uk...
    > Humphrey wrote:
    > > Sorry about the crosspost. I don't know these groups well enough to

    target
    > > my question more specifically. I'm trying to find out if there is a way

    to
    > > access the x and y coordinates from the tap event and cancel the event

    if
    > > necessary.
    > >
    > > Assume you have a list object containing the list of bread types below:
    > >
    > > White
    > > Whole Wheat
    > > Rye
    > > Multigrain
    > > Sourdough
    > > Russian Black Pareis
    > >
    > > Assume also that the list has a scroll bar and a max of four items
    > > displayed.
    > >
    > > It is very easy (too easy) for a user to tap the list area when they are

    in
    > > fact trying to tap the scroll bar. Is there a way to trap the tap
    > > coordinates on the list and cancel the event if it is deemed
    > > (programatically) to be too close to the scrollbar?
    > > The project is written in C using PODS and PRC-Tools.
    > > Any assistance would really be appreciated.
    > >
    > >

    > Can't you just make the list object a bit narrower?
    >
    > Gareth

    No. The length of the elements in the list can vary quite a bit, so there is
    often a lot of empty space to the right of the text. I'm trying to prevent
    interpreting a tap there as a tap event.



  5. Re: Using Tap event coordinates

    Thanks Tim, I'll give that a try.

    "Timothy R Oltrogge" wrote in message
    news:64EYd.128482$Th1.62285@bgtnsc04-news.ops.worldnet.att.net...
    >
    > "Humphrey" wrote in message
    > news:8qKdnW-k6KRD9a_fRVn-hg@wavecable.com...
    > >
    > > It is very easy (too easy) for a user to tap the list area when they are

    > in
    > > fact trying to tap the scroll bar. Is there a way to trap the tap
    > > coordinates on the list and cancel the event if it is deemed
    > > (programatically) to be too close to the scrollbar?
    > > The project is written in C using PODS and PRC-Tools.
    > > Any assistance would really be appreciated.
    > >
    > >

    > I am a new programmer in the Palm environment. I use C, PRC-Tools, and
    > PALM_OS_53_SIMULATOR for my testing. One of the first things I encountered
    > is that in your 'event loop' you normally first call on the system, via
    > SysHandleEvent(), to let the OS process any event that it knows about. If

    it
    > doesn't handle the event, signified by a FALSE return, then you must

    handle
    > it yourself. However, *before* calling SysHandleEvent() you may examine

    the
    > event yourself and take any action you wish, including (1) processing it,
    > (2) throwing it away, or (3) doing nothing so SysHandleEvent() will handle
    > it normally.
    >
    > So, you could look for a Pen-Down event, which has the coordinates with

    it,
    > determine if they are too close to the scroll-bar, and throw the event

    away.
    > If not too close, then you can use option (3) and pass the event to
    > SysHandleEvent(). However, this requires you to know where on the screen

    the
    > scroll bar is located (a slim vertical rectangle) and I don't know how you
    > extract this. I haven't used any Palm-provided menus yet.
    >
    > HTH
    >
    >




+ Reply to Thread