50.00-embedded_if 

50.00-embedded_if.png

Example 51. File 50.00-embedded_if

#! /bin/bash

export MAIN_DIALOG='
 <vbox>
  <frame Imperative Example>
    <checkbox active="true">
      <label>First checkbox</label>
      <variable>CHECKBOX</variable>
    </checkbox>
    <command assignment="n := 1"></command>
    <while condition="n = 22">
      <checkbox>
        <label>The second checkbox</label>
      </checkbox>
      <command assignment="n := n + 1"></command>
    </while>
  </frame>
  <hbox>
   <button ok>
     <variable>OKBUTTON</variable>
   </button>
   <button cancel></button>
  </hbox>
 </vbox>
'

gtkdialog --program=MAIN_DIALOG --print-ir
#gtkdialog --program=MAIN_DIALOG