-3
我需要2個單選按鈕,但它們中的每一個在SWT中的不同複合組中。我需要單獨選擇。請幫我看看代碼。 (使用擺動的ButtonGroup需要不)需要2個單選按鈕,但它們中的每一個在SWT中的不同複合組中
Shell shell = new Shell(display);
Default = new Group(shell,SWT.RADIO);
Default.setText("Default");
Default.setLayout(new RowLayout(SWT.HORIZONTAL));
compbutton = new Button(Default,SWT.RADIO);
compbutton.setText("Play against Computer");
pl2button = new Button(shell,SWT.RADIO);
pl2button.setText("Player1 Vs Player2");
當我嘗試選擇單選按鈕,都得到selected.I只需要其中的一個得到選擇。
分享你試過的代碼,我們可以幫您需要修正什麼獲得預期的結果。 – Apurv 2013-04-18 05:05:34
我已經添加了上面的代碼,請檢查並讓我知道。 – user2293514 2013-04-18 05:46:51