home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- December 3, 1992
-
- Dialog Design
-
- A Dialogbox Design Program for Turbo Vision
-
- Version 3.0
-
- (C) Copyright 1990-2 by L. David Baldwin.
- All Rights Reserved.
-
- Further copyright information given below.
-
-
- OVERVIEW
-
- Dialog Design takes some of the pain out of designing dialog boxes for
- Borland's Turbo Vision package. With Dialog Design, dialog controls can be
- easily added, edited, rearranged, and the dialog itself sized, moved, etc.
- Once the design is satisfactory, Dialog Design can produce source code to
- be included in your program or a resource file for use by your program.
-
-
- REQUIREMENTS
-
- Borland (R) Pascal version 7.0 (Turbo Vision 2.0)
- (Dialog Design version 2.x supports Turbo Pascal 6.0)
- Some familiarity with the Turbo Vision package
- A mouse is desirable
-
-
- DESIGNING A DIALOG BOX
-
- Dialog Design has three modes of operation:
-
- Design Mode
-
- Dialog Design begins in design mode and this is the mode that you use for
- all layout work and editing. In design mode, the dialog doesn't look or
- act quite like it will in the final design. Here's some of the
- differences:
-
- A 'canvas' background is used to better delineate the actual space
- occupied by each control.
-
- Controls are colored red when selected.
-
- Multiple controls may be selected.
-
- All controls may be selected even those not normally selectable.
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- Try Mode
-
- Try mode is entered using the F9 key. In try mode, the dialog behaves as
- it's supposed to. You can check the Tab order, make temporary entries,
- and push buttons to actually check how things will work. Exit try mode
- with the escape key or click on the close box.
-
- Ordering Mode
-
- Ordering mode allows you to change the Tab order of your dialog controls.
- The method for doing this is discussed further below. The F8 key toggles
- you into and out of ordering mode.
-
- While there is no fixed way to design a dialog, here's one suggested
- sequence:
-
- 1.In design mode, work with the dialogbox large enough so that you won't be
- crowded.
-
- 2.From the Add menu, select a control to add. This will bring up a dialog
- where you can enter the necessary information. Use the online help (F1
- key) if you have a question as to what goes in a particular field. When
- the OK button is pushed, the control will appear in the lower right corner
- of the design box. The control is then positioned by dragging it with the
- mouse, or by using the arrow keys (Shift+arrow moves a little faster).
- Work in the upper left corner of the box.
-
- 3.Continue adding controls as desired. At any time, controls can be
- repositioned or sized with the mouse (further details below). If
- something other than position or size needs changing, select the control
- and from the Edit menu choose Edit Selected (or use F7). This will bring
- up its dialogbox for changes.
-
- 4.When all the controls have been added and positioned, size the box to fit
- and move it to the desired location on the desktop. Be sure and add a
- title (Edit Dialog from the Edit menu).
-
- 5.Enter Try Mode with the F9 key and test the dialog. Be sure to check how
- the controls sequence using the Tab key. Exit Try mode with Esc or click
- on the close box.
-
- 6.If the Tab sequence needs changing, use F8 to enter ordering mode. With
- the mouse, click on each control to establish the desired order. Exit
- back to design mode with F8.
-
- Changing the sequence without a mouse is a little more complicated. Use
- the Tab key to select (highlight) the next control to be sequenced. Then
- press the Enter key to enter the selected control into the sequence.
- After all controls have been entered, exit back to design mode with F8.
-
-
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
- Some controls (such as Static Text, and Labels) don't enter into the
- tab sequence of a dialogbox. You can order these if it's convenient, but
- the order won't effect the final results.
-
- Be sure to recheck the tab order in Try mode.
-
- 7.This is a good time to save your work. Choose Save or Save As from the
- File menu to create or update a .DLG file. Any file with the same name
- will be renamed with a .BKP extension.
-
- 8.You can preview the source code to be generated by choosing Write Source
- to Screen from the Operations menu. The code will appear in a viewer
- window.
-
- 9.To create source code for your dialogbox, choose Write Source to File
- from the Operations menu and choose a filename (.SRC is the default
- extension). The source code produced will consist of a dialogbox
- definition function and a data record with fields matching those required
- by the dialog's SetData and GetData methods.
-
- The .SRC file generated may be inserted directly into TESTCASE.PAS (at
- the line of asterisks) to provide a program to test the dialogbox.
-
- 10.To generate a resource file or add the new dialogbox to an existing
- resource or EXE file, choose Write Resource from the Operation menu.
- Both a filename and a resource ID name will be requested. If the file
- already exists, it will be renamed with a .BKP extension. If the
- existing file is a resource or EXE file, it will be copied, and the new
- resource added to the copy. Any existing resource with the same ID will
- be deleted. Note that the resource ID name is case sensitive.
-
-
- SELECTING, CLICKING, DRAGGING, SIZING, ETC.
-
- To select a control, click and release on it with the left button or use the
- Tab key.
-
- To select multiple controls, select the first, then hold down the shift key
- while clicking on the others. Note that, in this mode, clicking toggles
- selection on and off so it's possible to deselect as well as select.
-
- You can also select a block of controls by using the mouse to define an
- enclosing rectangle. Position the mouse to one corner of the desired
- rectangle (the start position must not be on a control). Hold the left
- button down and drag to the opposite corner of the rectangle before
- releasing the button. During the drag operation, a shaded area will show
- the rectangle. Those controls completely enclosed by the rectangle
- will be selected. If the shift key is held down during this operation, any
- previously selected controls will remain selected.
-
- To select all controls, use the F4 key.
-
-
-
- 3
-
-
-
-
-
-
-
-
-
-
-
- To move controls, select the controls to be moved, then click on any one of
- them and, without releasing the button, drag the group to the desired
- position. The group may also be moved using the arrow keys.
-
- To resize a control, first select it then click and drag on its lower right
- corner. Note that some controls only size in one dimension and all have a
- minimum size.
-
- To edit a control, double click it with the left button or click on it with
- the right button. Or select it with the Tab key and press F7. Either way
- brings up the control's Add/Edit dialog.
-
-
- SOME DETAILS
-
- Command Line
-
- The command line used to load Dialog Design is:
-
- DLGDSN [<dialog filename>]
-
- The optional dialog filename specifies the name of a design file to be
- loaded. If no extension is given, '.DLG' is assumed.
-
- Options Button
-
- Most of the Add/Edit dialogs have an Options button. This button brings up
- another dialog which will let you change the default ofXXXX and evXXXX flag
- and mask bits. In most cases, you'll want to stick with defaults but some
- bits do have interesting uses. In particular, the ofFramed bit can be used
- for framing controls. Also, with a little effort, you can frame groups of
- controls or divide the dialog into panes. The context sensitive help (F1)
- for the options dialog has some hints on this.
-
- Help Context
-
- Many of the Add/Edit dialogs have fields labeled Help Context and Value.
- By default, these contain hcNoContext and 0. Dialog Design uses the help
- context symbol when generating source code and the value when producing a
- resource.
-
- For small projects, it may be convenient just to enter this information by
- hand. However, if you're using Borland's demo help compiler, TVHC, Dialog
- Design can work with the help definition file it produces. To do this,
- choose Load Help Ctx file from the Options menu and supply the filename of
- the help definition file. Then clicking on the '*' box next to the help
- context field (or typing '*' in the field) will bring up a pick list of the
- definitions from which to choose.
-
-
-
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
- During the various iterations of writing a help file, the numerical values
- associated with the help symbols are often changed. However, once a help
- context symbol has been entered for a control, Dialog Design will keep its
- associated help value current. Updating occurs whenever:
-
- A .DLG file is already loaded and a help context file is loaded
- or
- A help context file has been loaded and a new .DLG file is loaded.
-
-
-
- COPYRIGHT
-
- Documentation and Program (C) Copyright 1990-2 by L. David Baldwin.
- All Rights Reserved.
-
- Dialog Design may be copied and distributed freely by individuals to
- friends and acquaintances providing that no fee is charged and it is not
- part of a package for which a charge is made.
-
- Please report any problems, suggestions, etc. Contact me by Compuserve
- (best way) or at one of the addresses below.
-
- Dave Baldwin
- CompuServe ID #76327,53.
-
- 22 Fox Den Rd.,
- Hollis, NH 03049 (Approx May 15 to Oct 15)
- (603) 465-7857
-
- 144 13th St. East,
- Tierra Verde, FL 33715 (Approx Oct 15 to May 15)
- (813) 867-3030
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-