I'm implementing a custom ImageButton for touch enabled devices (9500,9550,9800,...)
I have problem that click(touch) outside field generates event in focused field.(when extending Field
, BitmapField
)
I can solve it by moving focus to empty field, but this is not very nice.
Strange thing is that this behaviour is for Field
, BitmapField
but not for ButtonField
.
It realy seems that when is ButtonField
focused, outside clicks don't generates button event.
I tryed extending ButtonField
, but I couldn't get rid of that stupid Button Background.
So my question; what is that difference in behavior between Field
and ButtonField
that causes generating events outside Field
?
this is how I removed button background:
// cahange button border
setBorder(BorderFactory
.createSimpleBorder(new XYEdges(0, 0, 0, 0)));
setBorder(VISUAL_STATE_ACTIVE, BorderFactory
.createSimpleBorder(new XYEdges(0, 0, 0, 0)));