[IT科技] MessageBox.open返回值的说明

发表于 @ 2009-6-8 18:00:26

        // 确认删除
        MessageBox messageBox = new MessageBox(shell, SWT.YES | SWT.NO);
        messageBox.setText("确认");
        messageBox.setMessage("你想删除这个编号为#" + bug.id + "的BUG吗 ?");
        // 如果是
        // SWT.YES 是
        // SWT.NO 否
        // SWT.CANCEL 取消
        // SWT.RETRY 重试
        // SWT.ABORT 放弃
        // SWT.IGNORE 忽略
        if (messageBox.open() == SWT.YES) {



Copyright © 2009 老紫竹
网站地图 | 最新文章 | 未读文章 | 24小时内热点文章 |津ICP备09000085号