0

如何使用对话框关闭第一个字符的红色字母?谢谢你。

http://www.img-share.net/uploads/bCK3OcaG20.jpg

完成代码..

对话框 --menu “菜单” 0 0 0\
"001" "MySQL 状态"\
"002" "MySQL 安装"\
"003" "MySQL 重新加载"\
"004" "MySQL 重启"\
"005" "MySQL 启动"\
"006" "MySQL 停止"
4

1 回答 1

1

应该有一种使用--colors的棘手方法来做到这一点。 http://www.linuxquestions.org/questions/programming-9/bash-scripting-using-color-in-dialog-612388/

使用它会创建一个带有 Hi(word is red) There(word is pink) 的对话框

dialog --colors --infobox "\Zb\Z1Hi \Z5there" 3 12

可能有一种改变颜色的方法,但如果你不介意一个混乱的解决方法:

dialog --menu "Menu" 0 0 0 " 1" "Description 1" " 2" "Description 2 etc"

通过在数字前添加一个空格,没有什么可以突出显示的。

于 2012-07-15T23:35:20.423 回答