使用 --text-info 选项来创建一个文本信息框。
文本信息框支持以下选项:
指定一个加载到文本信息框里的文件。
显示的文本允许编辑,当对话框关闭后,编辑后的文本显示到显示器上。
指定文本字体。
启用复选框,如“我已阅读并接受该条款。”
启用 html 支持。
设置一个网址,而不是文件。只有当您使用 --html 选项时才有效。
下面的脚本示范了如何创建一个文本信息对话框:
#!/bin/sh # You must place file "COPYING" in same folder of this script. FILE=`dirname $0`/COPYING zenity --text-info \ --title="License" \ --filename=$FILE \ --checkbox="I read and accept the terms." case $? in 0) echo "Start installation!" # next step ;; 1) echo "Stop installation!" ;; -1) echo "An unexpected error has occurred." ;; esac
想要评论?发现了一个错误?发现使用说明让人糊涂? 对此页面发送反馈。