home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / dlgdsn3 / dlgdsn.doc < prev    next >
Encoding:
Text File  |  1992-12-03  |  10.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                                           December 3, 1992
  9.  
  10.                                  Dialog Design
  11.  
  12.                   A Dialogbox Design Program for Turbo Vision
  13.  
  14.                                   Version 3.0
  15.  
  16.                    (C) Copyright 1990-2 by L. David Baldwin.  
  17.                              All Rights Reserved.
  18.  
  19.   Further copyright information given below.
  20.  
  21.  
  22.   OVERVIEW
  23.  
  24.   Dialog Design takes some of the pain out of designing dialog boxes for 
  25.   Borland's Turbo Vision package.  With Dialog Design, dialog controls can be 
  26.   easily added, edited, rearranged, and the dialog itself sized, moved, etc.  
  27.   Once the design is satisfactory, Dialog Design can produce source code to 
  28.   be included in your program or a resource file for use by your program.
  29.  
  30.  
  31.   REQUIREMENTS
  32.  
  33.     Borland (R) Pascal version 7.0 (Turbo Vision 2.0)
  34.        (Dialog Design version 2.x supports Turbo Pascal 6.0)
  35.     Some familiarity with the Turbo Vision package
  36.     A mouse is desirable
  37.  
  38.  
  39.   DESIGNING A DIALOG BOX
  40.  
  41.   Dialog Design has three modes of operation:
  42.  
  43.     Design Mode
  44.  
  45.     Dialog Design begins in design mode and this is the mode that you use for 
  46.     all layout work and editing.  In design mode, the dialog doesn't look or 
  47.     act quite like it will in the final design.  Here's some of the 
  48.     differences:
  49.  
  50.        A 'canvas' background is used to better delineate the actual space 
  51.        occupied by each control.
  52.  
  53.        Controls are colored red when selected.
  54.  
  55.        Multiple controls may be selected.
  56.  
  57.        All controls may be selected even those not normally selectable.
  58.  
  59.  
  60.  
  61.  
  62.                                       1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.     Try Mode
  75.  
  76.     Try mode is entered using the F9 key.  In try mode, the dialog behaves as 
  77.     it's supposed to.  You can check the Tab order, make temporary entries, 
  78.     and push buttons to actually check how things will work.  Exit try mode 
  79.     with the escape key or click on the close box.
  80.  
  81.     Ordering Mode
  82.  
  83.     Ordering mode allows you to change the Tab order of your dialog controls.  
  84.     The method for doing this is discussed further below.  The F8 key toggles 
  85.     you into and out of ordering mode.
  86.  
  87.   While there is no fixed way to design a dialog, here's one suggested 
  88.   sequence:
  89.  
  90.   1.In design mode, work with the dialogbox large enough so that you won't be 
  91.     crowded. 
  92.  
  93.   2.From the Add menu, select a control to add.  This will bring up a dialog
  94.     where you can enter the necessary information.  Use the online help (F1 
  95.     key) if you have a question as to what goes in a particular field.  When 
  96.     the OK button is pushed, the control will appear in the lower right corner 
  97.     of the design box.  The control is then positioned by dragging it with the 
  98.     mouse, or by using the arrow keys (Shift+arrow moves a little faster).  
  99.     Work in the upper left corner of the box.
  100.  
  101.   3.Continue adding controls as desired.  At any time, controls can be 
  102.     repositioned or sized with the mouse (further details below).  If 
  103.     something other than position or size needs changing, select the control 
  104.     and from the Edit menu choose Edit Selected (or use F7).  This will bring 
  105.     up its dialogbox for changes.
  106.  
  107.   4.When all the controls have been added and positioned, size the box to fit 
  108.     and move it to the desired location on the desktop.  Be sure and add a 
  109.     title (Edit Dialog from the Edit menu).
  110.  
  111.   5.Enter Try Mode with the F9 key and test the dialog.  Be sure to check how 
  112.     the controls sequence using the Tab key.  Exit Try mode with Esc or click 
  113.     on the close box.
  114.  
  115.   6.If the Tab sequence needs changing, use F8 to enter ordering mode.  With 
  116.     the mouse, click on each control to establish the desired order.   Exit 
  117.     back to design mode with F8.
  118.  
  119.     Changing the sequence without a mouse is a little more complicated.  Use 
  120.     the Tab key to select (highlight) the next control to be sequenced.  Then 
  121.     press the Enter key to enter the selected control into the sequence.  
  122.     After all controls have been entered, exit back to design mode with F8.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                       2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.     Some controls (such as Static Text, and Labels) don't enter into the 
  141.     tab sequence of a dialogbox.  You can order these if it's convenient, but 
  142.     the order won't effect the final results.  
  143.  
  144.     Be sure to recheck the tab order in Try mode.
  145.  
  146.   7.This is a good time to save your work.  Choose Save or Save As from the 
  147.     File menu to create or update a .DLG file.  Any file with the same name 
  148.     will be renamed with a .BKP extension.
  149.  
  150.   8.You can preview the source code to be generated by choosing Write Source 
  151.     to Screen from the Operations menu.  The code will appear in a viewer 
  152.     window.
  153.  
  154.   9.To create source code for your dialogbox, choose Write Source to File 
  155.     from the Operations menu and choose a filename (.SRC is the default 
  156.     extension).  The source code produced will consist of a dialogbox 
  157.     definition function and a data record with fields matching those required 
  158.     by the dialog's SetData and GetData methods.
  159.  
  160.     The .SRC file generated may be inserted directly into TESTCASE.PAS (at 
  161.     the line of asterisks) to provide a program to test the dialogbox.
  162.  
  163.   10.To generate a resource file or add the new dialogbox to an existing 
  164.     resource or EXE file, choose Write Resource from the Operation menu.  
  165.     Both a filename and a resource ID name will be requested.  If the file 
  166.     already exists, it will be renamed with a .BKP extension.  If the 
  167.     existing file is a resource or EXE file, it will be copied, and the new 
  168.     resource added to the copy.  Any existing resource with the same ID will 
  169.     be deleted.  Note that the resource ID name is case sensitive.
  170.  
  171.  
  172.   SELECTING, CLICKING, DRAGGING, SIZING, ETC.
  173.  
  174.   To select a control, click and release on it with the left button or use the 
  175.   Tab key.
  176.  
  177.   To select multiple controls, select the first, then hold down the shift key 
  178.   while clicking on the others.  Note that, in this mode, clicking toggles 
  179.   selection on and off so it's possible to deselect as well as select.
  180.  
  181.   You can also select a block of controls by using the mouse to define an 
  182.   enclosing rectangle.  Position the mouse to one corner of the desired 
  183.   rectangle (the start position must not be on a control).  Hold the left 
  184.   button down and drag to the opposite corner of the rectangle before 
  185.   releasing the button.  During the drag operation, a shaded area will show 
  186.   the rectangle.  Those controls completely enclosed by the rectangle 
  187.   will be selected.  If the shift key is held down during this operation, any 
  188.   previously selected controls will remain selected.
  189.  
  190.   To select all controls, use the F4 key.
  191.  
  192.  
  193.  
  194.                                       3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   To move controls, select the controls to be moved, then click on any one of 
  207.   them and, without releasing the button, drag the group to the desired 
  208.   position.  The group may also be moved using the arrow keys.
  209.  
  210.   To resize a control, first select it then click and drag on its lower right 
  211.   corner.  Note that some controls only size in one dimension and all have a 
  212.   minimum size.
  213.  
  214.   To edit a control, double click it with the left button or click on it with 
  215.   the right button.  Or select it with the Tab key and press F7.  Either way 
  216.   brings up the control's Add/Edit dialog.
  217.  
  218.  
  219.   SOME DETAILS
  220.  
  221.   Command Line
  222.  
  223.   The command line used to load Dialog Design is:
  224.  
  225.     DLGDSN [<dialog filename>]
  226.  
  227.   The optional dialog filename specifies the name of a design file to be 
  228.   loaded.  If no extension is given, '.DLG' is assumed.
  229.  
  230.   Options Button
  231.  
  232.   Most of the Add/Edit dialogs have an Options button.  This button brings up  
  233.   another dialog which will let you change the default ofXXXX and evXXXX flag 
  234.   and mask bits.  In most cases, you'll want to stick with defaults but some 
  235.   bits do have interesting uses.  In particular, the ofFramed bit can be used 
  236.   for framing controls.  Also, with a little effort, you can frame groups of 
  237.   controls or divide the dialog into panes.  The context sensitive help (F1) 
  238.   for the options dialog has some hints on this.
  239.  
  240.   Help Context
  241.  
  242.   Many of the Add/Edit dialogs have fields labeled Help Context and Value.  
  243.   By default, these contain hcNoContext and 0.  Dialog Design uses the help 
  244.   context symbol when generating source code and the value when producing a 
  245.   resource.
  246.  
  247.   For small projects, it may be convenient just to enter this information by 
  248.   hand.  However, if you're using Borland's demo help compiler, TVHC, Dialog 
  249.   Design can work with the help definition file it produces.  To do this, 
  250.   choose Load Help Ctx file from the Options menu and supply the filename of 
  251.   the help definition file.  Then clicking on the '*' box next to the help 
  252.   context field (or typing '*' in the field) will bring up a pick list of the 
  253.   definitions from which to choose.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                       4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   During the various iterations of writing a help file, the numerical values 
  273.   associated with the help symbols are often changed.  However, once a help 
  274.   context symbol has been entered for a control, Dialog Design will keep its 
  275.   associated help value current.  Updating occurs whenever:
  276.  
  277.        A .DLG file is already loaded and a help context file is loaded
  278.     or
  279.        A help context file has been loaded and a new .DLG file is loaded.
  280.  
  281.  
  282.  
  283.   COPYRIGHT
  284.  
  285.   Documentation and Program (C) Copyright 1990-2 by L. David Baldwin.  
  286.   All Rights Reserved.
  287.  
  288.   Dialog Design may be copied and distributed freely by individuals to 
  289.   friends and acquaintances providing that no fee is charged and it is not 
  290.   part of a package for which a charge is made.
  291.  
  292.   Please report any problems, suggestions, etc.  Contact me by Compuserve 
  293.   (best way) or at one of the addresses below.
  294.  
  295.   Dave Baldwin
  296.   CompuServe ID #76327,53.
  297.  
  298.   22 Fox Den Rd.,
  299.   Hollis, NH 03049        (Approx May 15 to Oct 15)
  300.   (603) 465-7857
  301.  
  302.   144 13th St. East,
  303.   Tierra Verde, FL 33715  (Approx Oct 15 to May 15)
  304.   (813) 867-3030
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                       5
  327.  
  328.  
  329.  
  330.  
  331.