Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
mrdialect2012
Posts: 27
Registered: ‎05-10-2012
My Device: bold 9700
My Carrier: Vodafone

How Do I track where the trackpad is on the screen and once the navigation point is found enable trackpad click event

I have been reading up on this and am unsure as in how to handle this. Is it using navigationMovement, do I have to initialise the trackpad somehow using Inputsettings?

 

Anyone?

Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: How Do I track where the trackpad is on the screen and once the navigation point is found enable trackpad click event

Trackpad in BlackBerry and mouse in Windows are two very different devices:

 

In Windows, the system has its own idea of "mouse position" and keeps track of it. The applications just ask the operating system about it. On BlackBerry, trackpad is not a pointing device: it is a navigation device. It never tells you a position - it reports movements. The system notifies UI objects (Fields) by calling their navigationMovement and navigationClick methods.

 

Most BlackBerry applications highlight the currently "focused" item (Field) - the one receiving keypad and navigation events (all Fields on the active screen receive touch events, but that's a different topic) and keep the scrolling positions so that this focused item is visible. You can emulate the Windows mouse (see how BlackBerry Web browser does it), but then your application must have a corresponding object keeping track of the "mouse pointer" position and drawing it.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.