Community
Participate
Working Groups
Execute the following: Shell shell = new Shell(); Button button = new Button(shell, SWT.NULL); shell.setDefaultButton(button); shell.setDefaultButton(null); shell.getDefaultButton(); getDefaultButton returns button when I expect it to return null The SWT decoration code looks suspect. NOTES: McQ (10/10/2000 3:20:09 PM) - SN to explain what is going on here. SN (8/7/01 11:21:14 AM) Setting the default button to "null" clears the current default button and causes it to snap back. To see this kind of behavior in a native widget, bring up the file dialog, stroke the 'cancel' button and then click on a file. The default button snaps back to the 'open' button. What we should do (easy fix) is to make setting the default button to 'null' twice clear the saved default. Also, we could add API to set/clear the saved deafult button. The first way is a bit ugly but requires no new API.
PRODUCT VERSION: 0.27b
Fixed > 20020705