[[HomePage]] > [[SoftwareIndex|Software Index]] > [[SoftwareDevelopment|Development]] > [[gtkdialog|gtkdialog]] > [[gtkdialogDocTips|Tips and Tricks]]
====1. Syntax====
The very basics of building a simple gui is told by the links in [[gtkdialog| gtkdialog documentation]]. You should have played a bit with some examples before you continue.
About QUOTES ( **{{color text=""" c="red"}}** and **{{color text="'" c="red"}}** )
To show content of a variable in the gtkdialog code, we need to quote the variable correctly inside the gtkdialog code.
%%(language-ref)
TEXT='Hello world'
export script='
'
gtkdialog --program=script
%%
Now in other words - Because this is important!!!
First realize that you put all the gtkdialog code into a variable - ie ##""MyGui""##:
~##export ""MyGui""=**{{color text=""" c="red"}}****{{color text=""" c="red"}}**##
if you now try to ##echo ""MyGui""## you'll get
~####
which is correct code. But if you use **{{color text="'" c="red"}}** instead of **{{color text=""" c="red"}}**, like this:
~##export ""MyGui""=**{{color text="'" c="red"}}****{{color text="'" c="red"}}**##
the value of ##""MyGui""## is
~####
This will give a syntax error, while
~##export ""MyGui""=''##
will give correct syntax.
Now using a variable inside the gtkdialog code like this:
~##TITLE="My title"
~export ""MyGui""=**{{color text=""" c="red"}}****{{color text=""" c="red"}}**##
returns
~####
while
~##export ""MyGui""=**{{color text="'" c="red"}}****{{color text="'" c="red"}}**##
returns
~####
and not the content of variable ##TITLE##
Now return to the first example about quotes. This example combines the use of ' and ".
===@@**#%[[gtkdialogDocTips|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips2|Next ❱❱❱]]#%**@@===
----
==Categories==
CategoryGtkdialog