using this code as an example.
with varied box
Code: Select all
#! /bin/bash
echo '1
2
3
4
5' > /tmp/list
export MAIN_DIALOG='
<vbox>
<hbox>
<tree>
<label>Backgrounds</label>
<variable>TREE</variable>
<input>cat /tmp/list</input>
<height>300</height><width>200</width>
</tree>
</hbox>
<hbox>
<checkbox>
<label>This is a checkbox</label>
<variable>CHECKBOX</variable>
</checkbox>
</hbox>
<hbox>
<radiobutton active="true">
<label>Radiobutton with active set to true</label>
<variable>RADIOBUTTON1</variable>
<action>echo Radiobutton is $RADIOBUTTON1 now.</action>
</radiobutton>
</hbox>
<hbox>
<combobox>
<variable>COMBOBOX</variable>
<item>First item</item>
<item>Second item</item>
<item>Third item</item>
</combobox>
</hbox>
<hbox>
<edit>
<variable>EDITOR</variable>
<width>350</width><height>150</height>
<default>
"This is the default text of the editor."
</default>
</edit>
</hbox>
<hbox>
<text>
<label>activates_default:</label>
</text>
<entry activates_default="true">
<default>Default value</default>
<variable>ENTRY1</variable>
</entry>
</hbox>
<hbox>
<text>
<label>invisible_char:</label>
</text>
<entry invisible_char="x" visibility="false">
<default>Default value</default>
<variable>ENTRY4</variable>
</entry>
</hbox>
<hbox>
<text>
<label>max_length:</label>
</text>
<entry max_length="5">
<default>Default value</default>
<variable>ENTRY5</variable>
</entry>
</hbox>
<hbox>
<colorbutton tag_attr="value"...>
<default>data</default>
</colorbutton>
</hbox>
<hbox>
<button ok></button>
<button cancel></button>
</hbox>
</vbox>
'
gtkdialog --program=MAIN_DIALOG
learning with the little I have on gtk,
I do not know how to establish whether the focus is on the checbox, or edit, or entry, etc.
excuse my english. I use traslator
Thanks