Input Box Examples

This script will show the different usage of $displayline, $promt and $ask.

To try the script, you need to download these images for the picture in the dialog boxes. Press right click and Save target as:

inputboxdialog.comi
/-------------------------------------------------------------------------------------------------------------/
/ Example Dialog for different input boxes for strings and numeric values 
/-------------------------------------------------------------------------------------------------------------/
 
$cons #state 0
$while #state<3 
  $if #state==0 
    $DIALOG ACTION=Start TITLE=''
      $GROUPBOX ACTION=Start TITLE='$Displaline examples' ORIENTATION=Horizontal Strips=2
        $LAYOUT SPANX 2
        $DISPLAYLINE '<nobr><div align="center" style="font-weight:bold;color:blue;font-size:10pt">One paragraph in one style</div></nobr>'
        $LAYOUT SPANX 2
        $displayline '<nobr><Font size=5 color=red><b>bold</b></font>, <Font size=10 color=green><i>italic</i></font>,   <Font size=12 color=orange><u>underline</u></font></nobr>'
        $displayline 'Image: '
        $displayline 'TT.png;100;100;'
        $LAYOUT SPANX 2
        $displayline 'Link: <a href="http://www.thomatronik.de">Thomatronik GmbH</a>'
        $LAYOUT SPANX 2
        $displayline 'Mail: <a href="mailto:info@thomatronik.de">info@thomatronik.de</a>'
      $GROUPBOX Action=Stop
    $DIALOG ACTION=first
    $cons #state #state+VF_ButtonPressed
  $end if
 
  $if #state==1
    $DIALOG ACTION=START TITLE=''
      $GROUPBOX ACTION=Start TITLE='$prompt examples' ORIENTATION=Horizontal Strips=3
        $Layout spanx 3
        $DISPLAYLINE '<nobr><div align="center">Examples for string input boxes:</div></nobr>'
        $PROMPT NAME=Motortyp PROMPT='Dropdownlist' HISTORY='Innenpol Aussenpol' EDIT=NO
        $PROMPT NAME=Rotor PROMPT='Inputbox' HISTORY='No' EDIT=yes
        $FILEPROMPT NAME=Dateiname PROMPT='Dateinamen angeben' LOAD=YES FILTER='*.TXT'
      $GROUPBOX ACTION=Stop     
     $Dialog ACTION=Next
     $cons #state #state+VF_ButtonPressed
   $end if
 
  $if #state==2
    $DIALOG ACTION=START TITLE=''
      $groupbox ACTION=START TITLE='$Ask Commands' ORIENTATION=Horizontal STRIPS=3 
        $Layout spanx 3
        $DISPLAYLINE '<nobr><div align="center">Examples for numeric input boxes:</div></nobr>'      
        $ask NAME=#a PROMPT='Dropdownlist' History='1 2 3' -Edit
        $ask Name=#b PROMPT='Checkbox' HISTORY='Checkbox' 
        $ask Name=#c PROMPT='Inputbox' HISTORY='No' 
        $Layout spanx 3          
        $ask Name=#d PROMPT='Pushbutton' HISTORY='Pushbutton' 
        $Layout skip 1    
        $ask Name=#e PROMPT='Go.png' HISTORY='Pushbutton' 
        $Layout skip 1    
       $GROUPBOX ACTION=Stop
     $Dialog ACTION=Next
    $cons #state #state+VF_ButtonPressed
  $end if
 
    //Pushbutton #d has been pressed
  $if #d==1 
    $Displayline 'The Pushbutton has been phushed !'
    //Go back to the last dialog  
    $cons #state 2
    //Reset the pushbutton
    $cons #d 0
  $end if 
 
   //Pushbutton #e has been pressed
  $if #e==1 
    $Displayline 'The Go Button has been phushed !'
    //Go back to the last dialog  
    $cons #state 2
    //Reset the pushbutton
    $cons #e 0
  $end if  
$end while

The pusbuttons will make the ok button disapear in a dialog box, because it will terminate the dialog box and hence the ok button is not needed any more.

scripts/dialogs/input_boxes.txt · Last modified: 2013/07/23 13:41 by henschel
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0