I am trying to set the SWT button to the “pressed” state programmatically. Is it possible somehow?
Update:
What I'm trying to achieve is to draw a button in the selected state on the image.
Image buttonimg_mouseover = new Image(getDisplay(), 100, 100); Button button = new Button(parent.parent, SWT.PUSH); button.setAlignment(SWT.CENTER); button.setImage(arrowimg); button.setSize(100, 100); button.setSelection(true);
source share