I am using the SWT application. I cannot select all the text in a text box or text area Ctrl+A.
Is there any way to achieve this?
text.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.stateMask == SWT.CTRL && e.keyCode == 'a') { text.selectAll(); e.doit = false; } } });
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Addaselectallmenuitemtothecontrol.htm
Ideally, according to LAF doco, if you set the right look, you should get it automatically.
UIManager.setLookAndFeel( UIManager.getCrossPlatformLookAndFeelClassName());
If you do not see what they did here http://www.roseindia.net/java/example/java/swing/copy-data-from-ms.shtml
Source: https://habr.com/ru/post/1733493/More articles:iPhone, cocos2d coordinate system - iphoneRemove unused CSS on the fly? - cssLDAP: using a filter to avoid using additional CN in Active Directory - javaесть способ отправить все значения входных элементов управления в asp.net - syntaxRadComboBox how to get selectedItem - javascriptDynamically allocating an array of size 0 - c ++$ (this) and this, what's the difference? - jqueryHow to create a component in Joomla 1.5? - joomlaProblem displaying TabHost layout in new intent - androidSQL Server - CHARINDEX always returns 0 - stringAll Articles