SWT tips collection.

xiaoxiao2021-03-06  82

Use the Layout method in Composite to refresh all of its components. The syncexec () and asyncExec () methods in Display are bridge methods for external thread calling local threads. Syncexec must wait until the end of the call before you can make the process, and Asyncexec is called thread. There is no need to wait for the back process. Print preview, when the device is printer, it is changed to the printed preview?! ^ 0 ^ Update SWT-Designer If there is "Unknown Window Type" (PARSER ERROR) ", the Eclipse system buffers the plugin (for quick start), then add-Clean parameters (for example, Eclipse.exe -clean -vmargs -xverify: none -xmx384m -xms256m) reconstructs the plug-in buffer when starting Eclipse You can solve this problem. Multi-button listen to the implementation, listen to the combination buttons such as SWT.SHIFT, SWT.CTRL, SWT.ALT using KeyEvent, use the Keycode method, such as A, B, 1, 2, and F1 , F2, etc. For example, monitor the Ctrl Alt F1 button, the code is event.Statemask == (swt.ctrl | swt.alt) && event.keycode == swt.f1.

转载请注明原文地址:https://www.9cbs.com/read-120837.html

New Post(0)