05-02-2012 12:17 PM
currently implementing a custom list, with a thumbnail to the left and two textFields stacked ontop of each other to the right of the thumbnail.
got them setup right and the views are showing correctly. Just now some highlighting problems, I cant get the selectiong and unselect states correct.
I know I need to override touchEvent but dont know which states. I either get to many of the seperate hfm's or none of them.
I need them to lightup when touched/dragged and when clicked a different colour. Then when untouched leave just one highlighted. Currently more than one seams to light up when dragged.
Also having a problem where the trackpad highlighted and the one selected by touch are two seperate entities.
also scroll doesnt work properly, when moving off screen with the trackpad the screen doesnt scroll down, only scrolls down when reaching the bottom
help please
05-03-2012 05:24 AM
It once tried your way, but I find it far better to implement that kind of list with ObjectListField. But you have to position each cell pixel-relative.
If you keep this way, do not use touchEvent for focus state, let Blackberry manage focus, just decide what to draw.
To know when the field get the focus use:
protected void onFocus(int direction) {}
protected void onUnfocus() {}
Override that method to disable default blue-selected color:
protected void drawFocus(Graphics graphics, boolean on) {
}