本文介绍了我想使用java swt在带有正确间距的gridlayout中设置相等大小的单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用java swt设置带有适当间距的gridlayout中的单元格大小吗?
I want to set size of cells in gridlayout with properspacing using java swt?
推荐答案
GridData oGridData = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1,1);
oGridData.widthHint = 600;
oGridData.heightHint = 300;
oComponent.setLayoutData(oGridData);
尝试这个.
还请检查以下链接:
http://www.eclipse.org/swt/ [ ^ ]
http://www.vogella.de/articles/SWT/article.html [ ^ ]
http://www.eclipsepluginsite.com/jface.html [ ^ ]
Try this.
also please check these links:
http://www.eclipse.org/swt/[^]
http://www.vogella.de/articles/SWT/article.html[^]
http://www.eclipsepluginsite.com/jface.html[^]
container.setLayout(new GridLayout(1, true));
container.setLayoutData(new GridData(GridData.FILL_BOTH));
所以在这个例子中我该怎么办?
so how would i do in this example?
这篇关于我想使用java swt在带有正确间距的gridlayout中设置相等大小的单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!