Jan 15

Pre-selecting list-items on a zenity list dialog is not possible

Category: Linux   — Published by goeszen on January 15, 2016 at 11:22 am

Marking or preselecting an entry in a list-dialog in Zenity, to my knowledge, is not possible. So you can't set the list cursor on one of the list-items programmatically, before generating the dialog, and indicating some sort of "current state" to the user. Or again in different words: you can't highlight one of the entries from the list prior to the user selecting one item via mouse or keyboard.

The only workaround is using a --checklist or --radiolist, where you can set the value of the column holding the radio-button/check-mark to TRUE or FALSE, as zenity will then mark this entry as selected when the dialog pops up.

Leave a Reply