1
<?xml version="1.0" encoding="utf-8"?>
2
<page xmlns="http://projectmallard.org/1.0/" type="topic" id="scale" xml:lang="pt_BR">
4
<link type="guide" xref="index#dialogs"/>
5
<desc>Use the <cmd>--scale</cmd> option.</desc>
7
<title>Scale Dialog</title>
9
Use the <cmd>--scale</cmd> option to create a scale dialog.
12
The scale dialog supports the following options:
18
<title><cmd>--text</cmd>=<var>TEXT</var></title>
19
<p>Set the dialog text. (Default: Adjust the scale value)</p>
23
<title><cmd>--value</cmd>=<var>VALUE</var></title>
24
<p>Set initial value. (Default: 0) You must specify value between minimum value to maximum value.</p>
28
<title><cmd>--min-value</cmd>=<var>VALUE</var></title>
29
<p>Set minimum value. (Default: 0)</p>
33
<title><cmd>--max-value</cmd>=<var>VALUE</var></title>
34
<p>Set maximum value. (Default: 100)</p>
38
<title><cmd>--step</cmd>=<var>VALUE</var></title>
39
<p>Set step size. (Default: 1)</p>
43
<title><cmd>--print-partial</cmd></title>
44
<p>Print value to standard output, whenever a value is changed. </p>
48
<title><cmd>--hide-value</cmd></title>
49
<p>Hide value on dialog.</p>
55
The following example script shows how to create a scale dialog:
61
VALUE=`zenity --scale --text="Select window transparency." --value=50`
65
echo "You selected $VALUE%.";;
67
echo "No value selected.";;
69
echo "An unexpected error has occurred.";;
73
<figure id="zenity-scale-screenshot">
74
<title>Scale Dialog Example</title>
75
<desc><app>Zenity</app> scale dialog example</desc>
76
<media type="image" mime="image/png" src="figures/zenity-scale-screenshot.png"/>