I am implementing a custom ImageButton for touch control devices (9500,9550,9800, ...) I have a problem that clicking (touching) an external field generates an event in the focused field. (When expanding Field , BitmapField )
I can solve this by moving the focus to an empty field, but it is not very nice. The strange thing is that this behavior is for Field , BitmapField , but not for ButtonField . Apparently, when focusing the ButtonField external clicks do not generate a button event.
I tried to extend ButtonField , but I could not get rid of this stupid Button background.
So my question is; What is the difference in behavior between Field and ButtonField that causes events to be generated outside of Field ?
this is how i removed the background button:
// cahange button border setBorder(BorderFactory .createSimpleBorder(new XYEdges(0, 0, 0, 0))); setBorder(VISUAL_STATE_ACTIVE, BorderFactory .createSimpleBorder(new XYEdges(0, 0, 0, 0)));
source share