我有一个

private Button testSomethingCheckBox;

testSomethingCheckBox= new Button(parent, SWT.CHECK);


我想在调用另一个函数时将其选中(激活)吗?有什么线索吗?

最佳答案

您可能想阅读此documentation
对于您的问题,在调用所需函数时使用testSomethingCheckBox.setSelection(true);

10-06 10:55