![](/img/trans.png)
[英]Count of radio buttons not working, redirected to first activity automatically when clicking on button
[英]java radio buttons in jface automatically setting the first button to true
這是一個難題,每次我在SWT / JFace中創建一組單選按鈕時,第一個按鈕始終為true,但是如果創建一個標准按鈕並調用它以重置單選按鈕,它將重置為false。 我希望將其默認設置為false。 有沒有遇到過這樣的問題以及如何解決? 提前致謝
創建一組單選按鈕時,一次只能選擇其中的一個。 通過選擇其他按鈕,第一個按鈕變為未選擇狀態。 因此,如果將“ selected true”設置為第二個單選按鈕,則第一個單選按鈕將未被選中。
如果創建一組單選按鈕,則默認情況下始終選擇第一個按鈕。 采用
secondRadioButton.setSelection(true);
改變狀態...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.