【问题标题】:How to add an on/off sliders in SWT?如何在 SWT 中添加开/关滑块?
【发布时间】:2013-01-24 08:15:59
【问题描述】:

我找到了a similar question on SO,但它在 Swing 中。我想在 SWT 中做同样的事情。

那么如何在 SWT 中制作 ON/OFF 滑块?

【问题讨论】:

    标签: java swt


    【解决方案1】:

    opal project 有一个 SwitchButton,这应该正是您要搜索的内容。截图如下:

    你可以这样使用它:

    SwitchButton button = new SwitchButton(shell, SWT.NONE);
    button.setTextForSelect("ON");
    button.setTextForUnselect("OFF");
    

    【讨论】:

      猜你喜欢
      • 2011-11-10
      • 1970-01-01
      • 1970-01-01
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多