开发者

flickering of image in SWT

开发者 https://www.devze.com 2023-03-26 08:47 出处:网络
I am building an SWT application, I have used a ScrolledComposite and a Composite inside that. This has a few more buttons and checkboxes . All this is inside a Composite.

I am building an SWT application, I have used a ScrolledComposite and a Composite inside that. This has a few more buttons and checkboxes . All this is inside a Composite.

Now I tried to put this main composite in the tab. It worked fine but the image flickers a lot even if I don't scroll or resize. If I put this main composite inside a shell, its working perfect without any flicker.

Why is this开发者_高级运维 happening?


Did you set the SWT.DOUBLE_BUFFERED style bit on your Composite? That might fix it.


Write SWT.DOUBLE_BUFFERED in declaration

Example:

scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.DOUBLE_BUFFERED);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号