Community
Participate
Working Groups
is it possible to control the look & feel for the check mark and the rectangle box around it? e.g., if we have to implement a semi-checked state as available for "Wrap" and "Merge" check boxes in the "Format" dialog in MS Excel. This is shown if you select multiple cells in MS excel and some of them have wrap enabled and some not OR some are merged and some are not. It should not be confused with a disabled check box as a disabled check box does not show the focus and also its caption is grayed out. If you click on this semi-checked state, it will show a fully check state first, i.e., white background and black check mark. Second click will remove the check mark. Third check will again show the semi-checked state. If currently this is not available, then is there any work-around to achieve this? I have a similar requirement for Radio button also. thnx.
Created attachment 48077 [details] sample image for semi-checked state. attaching an image for the sample. thnx.
Please see bug 22261 for the check box part. In the absence of greyed radio buttons, one could use a combo box with some kind of "<Mixed>" entry.
Marking report as a duplicate. The only workaround I can think of, which is a bit crazy, is to use a one-item table. See snippet below: public static void main(String [] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setBounds(10,10,200,200); shell.setLayout(new GridLayout()); new Button(shell, SWT.CHECK).setText("normal button 1"); Table table = new Table(shell, SWT.CHECK); table.setBackground(shell.getBackground()); TableItem item = new TableItem(table,SWT.NONE); item.setText("gray"); item.setGrayed(true); new Button(shell, SWT.CHECK).setText("normal button 2"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } *** This bug has been marked as a duplicate of 22261 ***