1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="entry" xml:lang="sl">
4
<link type="guide" xref="index#dialogs"/>
5
<desc>Use the <cmd>--entry</cmd> option.</desc>
7
<title>Text Entry Dialog</title>
9
Use the <cmd>--entry</cmd> option to create a text entry dialog. <app>Zenity</app> returns the contents of the text entry to standard output.
12
The text entry dialog supports the following options:
18
<title><cmd>--text</cmd>=<var>text</var></title>
19
<p>Specifies the text that is displayed in the text entry dialog.</p>
23
<title><cmd>--entry-text</cmd>=<var>text</var></title>
24
<p>Specifies the text that is displayed in the entry field of the text entry dialog.</p>
28
<title><cmd>--hide-text</cmd></title>
29
<p>Hides the text in the entry field of the text entry dialog.</p>
35
The following example script shows how to create a text entry dialog:
42
--title="Add new profile" \
43
--text="Enter name of new profile:" \
44
--entry-text "NewProfile"
46
else echo "No name entered"
51
<figure id="zenity-entry-screenshot">
52
<title>Text Entry Dialog Example</title>
53
<desc><app>Zenity</app> text entry dialog example</desc>
54
<media type="image" mime="image/png" src="figures/zenity-entry-screenshot.png"/>