Using SWT, what is the general way to indicate that a menu item (from the taskbar menu) is the currently active selection? Check mark? Fatty? How is this done with code?
Use the CHECK style during instance creation:
MenuItem menuItem = new MenuItem(menu, SWT.CHECK);
Use getSelection to check status:
boolean isSelected = menuItem.getSelection();
org.eclipse.swt.widgets.MenuItem setSelection (true) / getSelection ()
The selection style depends on the style of the menu item: CHECK, CASCADE, PUSH, RADIO, SEPARATOR, as in:
alt text http://jmdoudoux.developpez.com/cours/developpons/java/images/swt047.png alt text http://jmdoudoux.developpez.com/cours/developpons/java/images/swt046.png
MenuItem.getSelection()
Source: https://habr.com/ru/post/1704191/More articles:Сделайте визуальную студию разворачивать содержимое папки без необходимости ее обновления в проекте - visual-studioDisplay submission on the fly - frameworksJava binding JTextField → java.lang.Integer problem - javaFinding Alpha Support MsPaint Alternatives - editorhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1704190/how-easy-it-really-is-to-implement-dragdrop-in-silverlight&usg=ALkJrhjNoUa0CVKmrkyhjaDH_64ABGdANwHow to specify the level of database isolation to be used at a high level? - performanceCan I refer to column names through bind variables in Oracle? - oracleUsing GetHashCode to "protect" user passwords - securityDiv position detection - javascriptHow to include additional compiler arguments when using mxmlc ant task? - flexAll Articles