More scripts: Dialog
Syntax Highlighing:
comments, key words, predefined symbols, class members & methods, functions & classes
<?xml version="1.0"?>
<!DOCTYPE root SYSTEM "smlforms.dtd">
<root>
<dialog id="hello" Title="Bonjour" OnOpen="SayHello()">
<pane>
<label>Sample Dialog Window</label>
<groupbox Name="Language" ExtraBorder="4">
<listbox id="listbox" SelectStyle="single" Height="3" Default="French" OnChangeSelection="SayHello()">
<item Value="English" Name="English"/>
<item Value="French" Name="French"/>
<item Value="German" Name="German"/>
<item Value="Spanish" Name="Spanish"/>
</listbox>
</groupbox>
</pane>
</dialog>
<script>
<![CDATA[
proc SayHello () {
clear();
local string language$;
language$ = dlg.GetCtrlValueStr("listbox");
if ( language$ == "English" ) then
print("Hello!");
else if ( language$ == "French" ) then
print("Bonjour!");
else if ( language$ == "German" ) then
print("Hallo!");
else if ( language$ == "Spanish") then
print("Hola!");
}
]]>
</script>
</root>