| | | 17.9.1.Introducing Button and Button Styles |
|
|
- SWT uses Button to represent checkboxes, toggle buttons, and radio buttons.
- You determine the type by the style constants.
- You may pass only one of SWT.LEFT, SWT.CENTER, or SWT.RIGHT.
- You may pass only one of SWT.ARROW, SWT.CHECK, SWT.PUSH, SWT.RADIO, or SWT.TOGGLE.
- If you pass SWT.ARROW, you may pass only one of SWT.UP, SWT.DOWN, SWT.LEFT, or SWT.RIGHT.
|
| Style | Description | | SWT.ARROW | Creates a push button that displays an arrow. | | SWT.CHECK | Creates a checkbox. | | SWT.PUSH | Creates a push button. | | SWT.RADIO | Creates a radio button. | | SWT.TOGGLE | Creates a push button that preserves its pushed or nonpushed state. | | SWT.FLAT | Creates a push button that appears flat. | | SWT.UP | When combined with SWT.ARROW, displays an upward-pointing arrow. | | SWT.DOWN | When combined with SWT.ARROW, displays a downward-pointing arrow. | | SWT.CENTER | Centers the associated text. | | SWT.LEFT | Left-aligns the associated text. When combined with SWT.ARROW, displays a leftward-pointing arrow. | | SWT.RIGHT | Right-aligns the associated text. When combined with SWT.ARROW, displays a rightward-pointing arrow. |
|
|