Textinformationsdialog

Använd flaggan --text-info för att skapa en textinformationsdialog.

Textinformationsdialogen har stöd för följande flaggor:

--filename=filnamn

Anger en fil som läses in i textinformationsdialogen.

--editable

Allows the displayed text to be edited. The edited text is returned to standard output when the dialog is closed.

Följande exempelskript visar hur man skapar en textinformationsdialog:

        #!/bin/sh

        FILE=`zenity --file-selection \
          --title="Välj en fil"`

        case $? in
                 0)
                        zenity --text-info \
                          --title=$FILE \
                          --filename=$FILE \
                          --editable 2>/tmp/tmp.txt;;
                 1)
                        echo "Ingen fil vald.";;
                -1)
                        echo "Ingen fil vald.";;
        esac
      

Figur 11Exempel på textinformationsdialog