SWT:分割窗口
来源:互联网 发布:淘宝店铺七天无理由 编辑:程序博客网 时间:2024/05/16 09:23
public static void showSashForm(Shell shell)
{
//创建窗框对象,设置样式为水平排列
SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.BORDER);
//平滑外观
//SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.SMOOTH);
//垂直放置
//SashForm form = new SashForm(shell, SWT.VERTICAL | SWT.BORDER);
form.setLayout(new FillLayout());
//创建窗口1的面板
Composite child1 = new Composite(form, SWT.NONE);
child1.setLayout(new FillLayout());
new Text(child1, SWT.MULTI).setText("窗口 1");
//创建窗口2的面板
Composite child2 = new Composite(form, SWT.NONE);
child2.setLayout(new FillLayout());
new Text(child2, SWT.MULTI).setText("窗口 2");
//设置某一个控件最大化
//form.setMaximizedControl(folder);
//设置还原
//form.setMaximizedControl(null);
//设置初始状态两个面板所占的比例
form.setWeights(new int[]{30, 70});
//设置窗口显示的比例
//form.setWeights(new int[]{30, 30, 40});
}
{
//创建窗框对象,设置样式为水平排列
SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.BORDER);
//平滑外观
//SashForm form = new SashForm(shell, SWT.HORIZONTAL | SWT.SMOOTH);
//垂直放置
//SashForm form = new SashForm(shell, SWT.VERTICAL | SWT.BORDER);
form.setLayout(new FillLayout());
//创建窗口1的面板
Composite child1 = new Composite(form, SWT.NONE);
child1.setLayout(new FillLayout());
new Text(child1, SWT.MULTI).setText("窗口 1");
//创建窗口2的面板
Composite child2 = new Composite(form, SWT.NONE);
child2.setLayout(new FillLayout());
new Text(child2, SWT.MULTI).setText("窗口 2");
//设置某一个控件最大化
//form.setMaximizedControl(folder);
//设置还原
//form.setMaximizedControl(null);
//设置初始状态两个面板所占的比例
form.setWeights(new int[]{30, 70});
//设置窗口显示的比例
//form.setWeights(new int[]{30, 30, 40});
}
- SWT:分割窗口
- swt分割栏
- 分割窗口
- 分割窗口
- 分割窗口
- 分割窗口
- 窗口分割
- 窗口分割
- 窗口分割
- 分割窗口
- 窗口分割
- 窗口分割
- swt创建不规则窗口
- SWT窗口预览
- SWT 窗口居中
- SWT固定窗口大小
- SWT固定窗口大小
- MFC窗口分割类CSpliterWnd分割窗口
- java 服务降级开关设计思路
- 换种方式学编程:如何训练你的机器人
- C#写webservice服务引用
- 骨骼图像增强实验matlab实现
- PHP正则表达式(1):匹配字符串不能包含中文
- SWT:分割窗口
- Java集合的排序和HashCode方法详解
- android 拍照指定存储路径 检查SD卡状态
- linux内核配置文件.config,基于s3c2410实现
- 求含n个顶点的多边形面积
- 二分查找算法
- Linux内存映射——mmap
- using
- side--右边栏