开发者

dialog --menu selected option

My script is:

开发者_如何学JAVA
dialog --title 'Example' --menu 'Select:' 0 0 0 1 'ABC' 2 'DEF' 3 'GHI'

I would like that option 2 was selected by default (over). Its possible?


Try:

dialog --title 'Example' --default-item '2' --menu 'Select:' 0 0 0 1 'ABC' 2 'DEF' 3 'GHI'


dialog --title "Example" --default-item '2' --menu "Select:" 25 25 3 1 "ABC" 2 "DEF" 3 "GHI"

use of ["] for strings is most recommended --default-item is common option provided into dialog utilities for menu box or forms. This will keep selection on '2' option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜