home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- December 1, 1990
-
- DLGDSN Version 1.0
-
- A Dialogbox Design Program for Turbo Vision
-
- (C) Copyright 1990 by L. David Baldwin.
- All Rights Reserved.
-
- Further copyright information given below
-
-
- OVERVIEW
-
- DLGDSN takes some of the pain out of designing dialog boxes for Borland's
- new Turbo Vision package. With DLGDSN, dialog views can be easily added,
- edited, rearranged, and the dialogbox itself sized, moved, etc. Once the
- design is satisfactory, DLGDSN can produce source code to be included in
- your program or a resource file for use by your program.
-
-
- REQUIREMENTS
-
- Borland's Turbo Pascal(R) version 6.0
- Some familiarity with the Turbo Vision package
- A mouse is desirable
-
- The following files are supplied:
-
- DLGDSN.EXE The design program
- DLGHLP.HLP Online help file
- DLGDSN.DOC This one
- TESTCASE.PAS A test program to check the source code produced by DLGDSN
-
-
- DESIGNING A DIALOG BOX
-
- DLGDSN has three modes of operation:
-
- Design Mode
-
- DLGDSN begins in design mode and this is the mode that you use for all
- layout work and editing. In design mode, the dialogbox doesn't look or
- act quite like it will in the final design. For one thing, there is a
- 'canvas' background which helps show the actual space occupied by the
- views. Also, to facilitate editing, all views can be selected using the
- mouse or tab key though some won't be selectable in an actual dialogbox.
-
- Try Mode
-
- Try mode is entered using the F9 key. In try mode, the dialogbox behaves
- as it's supposed to. You can check the Tab order, make temporary
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 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 dialogbox. 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 dialogbox, here's one suggested
- sequence:
-
- 1.In design mode, work with the dialogbox fully zoomed.
-
- 2.From the Add menu, select a view to add. This will bring up a dialogbox
- 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 view will appear somewhere in the (fully
- zoomed) design box. The view is then positioned by dragging it with the
- mouse, or by using the arrow keys. Work in the upper left corner of the
- box.
-
- 3.Continue adding views as desired. At any time, views can be repositioned
- with the mouse or arrow keys. If something other than position needs
- changing, select the view and from the Edit menu choose Edit Selected (or
- use F7). This will bring up its dialogbox for changes.
-
- 4.When all the views 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 (Dialog Title from the Edit menu).
-
- 5.Enter Try Mode with the F9 key and test the dialogbox. Be sure to check
- how the views 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 view 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 view to be sequenced. Then
- press the Enter key to enter the selected view into the sequence. After
- all views have been entered, exit back to design mode with F8.
-
- Some views (such as Static Text, Labels, Scrollbars) 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.
-
-
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
- 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.To create source code for your dialogbox, choose Write Source 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 dialogbox'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.
-
- 9.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.
-
-
- SOME DETAILS
-
- Pointer Names
-
- Many of the Add/Edit dialogboxes have a field labeled 'Pointer Name'. By
- default, this field contains the standard Turbo Vision pointer symbol for
- the view. This field exists for situations where it may be desirable to
- use a derived view which doesn't differ much from its standard view parent.
- The pointer name entered here will be the one used when generating the
- source code for the dialogbox.
-
- Help Context
-
- Many of the Add/Edit dialogboxes also have fields labeled Help Context and
- Value. By default, these contain hcNoContext and 0. DLGDSN uses the help
- context ID 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, DLGDSN
- 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.
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT
-
- Documentation and Program (C) Copyright 1990 by L. David Baldwin.
- All Rights Reserved.
-
- DLGDSN 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.
-
-
- Source code for DLGDSN is available for $15 (need not be sent in advance).
- Also please report any problems, suggestions, etc.
-
- Contact me by Compuserve (the best way) or at one of the addresses below.
-
- Dave Baldwin
- CompuServe ID #76327,53.
-
- 22 Fox Den Rd.,
- Hollis, NH 03049 (Summer)
- (603) 465-7857
-
- 144 13th St. East,
- Tierra Verde, FL 33715 (Winter, of course)
- (813) 867-3030
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 4
-
-
-
-
-