Copyright: (c) Copyright FTP Software, Inc. 1997.
Citation: '(c) Copyright FTP Software, Inc. 1997. All rights reserved.


Overview
OPEN Script Dialog Editor Overview

The Dialog Editor is used to graphically edit the layout of dialog boxes used in OPEN Script.  The OPEN Script Editor invokes the Dialog Editor with the Edit Dialog command.  The Dialog Editor can also be run directly, getting its input from the clipboard or from a file.

Adding New Controls	How to add controls to the dialog box
Modifying Controls	How to change the layout of the dialog box
Dialog Box Properties	How to change the properties of the dialog box
Control Palette	Description of the control palette
Toolbar	Description of the commands on the toolbar
Menu	Description of the controls for the OPEN Script Dialog Editor


Modifying
Modifying Controls in the Dialog Box

Controls in the dialog box may be moved, sized, or deleted from the dialog box.  In addition, controls have properties such as control labels and control IDs.  Please see the description of individual controls for information on these properties.


Control Properties

There are several attributes of a control that may be edited in the control's property sheet.  The property sheet for a control may be activated by double-clicking the control whose properties you would like to edit.  In addition, if a single control is active, pressing the Enter key activates the property sheet for that control.

Examples of control properties include the control's position and size.  In addition, many controls have a control ID, which is the identifier used to access the control from an OPEN Script script and a control Label.

Control labels are either strings or OPEN Script expressions, which when executed in OPEN Script result in a string.  This resulting string is then used to visually identify a control in the dialog box and to assist in keyboard navigation of the dialog box.  Characters preceded by an ampersand (&) in a label are underlined.  For example, setting a label to &Name causes Name to be displayed on the control with which the label is associated.  This underlined letter indicates the hotkey associated with this control.  Holding down the Alt key while pressing the underlined letter in the label causes an action to occur to the control containing the label.  For Buttons, OptionButtons, and CheckBoxes, the action is the same as clicking the control.  For Text Controls, the hotkey causes the control following the text control in the Tab Order to be activated.  This provides a mechanism for labeling controls that do not have labels of their own, such as TextBoxes and ListBoxes.

For information on properties particular to individual controls, see the desciption of those controls.


Moving Controls

Selected controls can be moved by dragging them from one position to another.  To drag a control, position the mouse over the selected control until the cursor turns into [image].  Then, press and hold the mouse button and move the mouse until the control is in the desired position.  Then, release the mouse button.

Collections of selected controls can be moved in a similar manner.  Simply drag one of the selected controls and the rest will follow.


Sizing Controls

If a single control is Selected it may be resized by dragging on its sizing handles.  The sizing handles of a selected control are the solid black rectangles that appear in the hatched border around the selected control.  Move the mouse over one of these solid black rectangles and its shape will change to [image], [image], [image], or [image].  Press and hold the mouse button and move the mouse until the control is the desired size, then, release the mouse button.


Dialog Box Properties

The dialog box has several properties that affect its behavior in your basic program.  The size and relative position of the dialog box may be modified directly by changing the size and position of the dialog box window in the Dialog Editor.

To change the size of the dialog box, move the mouse over the borders of the dialog box until the cursor changes to either [image], [image], [image], or [image].  Then press and hold the mouse button, move the mouse until the outline shows the desired size, and release the mouse button to complete the operation.

To change the position of the dialog box, move the mouse into the caption of the dialog box, press and hold  the mouse button, move the mouse until the dialog box is in the desired position, then release the mouse button.

The size and position of the dialog box as well as other properties of the dialog box can be modified in the Dialog Box Properties dialog box.  To display this dialog box, double-click an area of the dialog box window that does not contain any controls or press the Enter key when there are no controls selected.

Here is a description of the properties that can be modified in the Dialog Box Properties dialog box:

Position - The position of the dialog box relative to the upper left corner of the application can be set by setting the Position check box and modifying the X and Y fields of the Dialog Box Properties dialog box.  If X and/or Y contains a valid number, the position of the dialog box window in the Dialog Editor is modified accordingly.  Non-numeric values for X and/or Y are assumed to be OPEN Script expressions which are interpreted when the program using the OPEN Script dialog box is executed.  If the Position check box is not checked, the dialog box is centered on the application.  The Width and Height fields of the dialog box are used to change the size of the dialog box.

Dialog ID - This specifies the type name of the dialog box used in your OPEN Script script.

Caption & Caption Type - The Caption Type field specifies the type of caption to use for your dialog box.  If None is selected, the Caption field of this dialog box is disabled and the dialog box caption is set to the applications default dialog box caption.  If Caption Type is set to String, then the Caption field is enabled and its contents are used to set the caption of the dialog box.  If Caption Type is set to Expression, then the Caption field is assumed to contain an OPEN Script expression.  In this last case, the OPEN Script expression is not interpreted by Dialog Editor, but will be properly interpreted by OPEN Script when the program using the OPEN Script dialog box is executed.

Function - This field specifies the name of the optional dialog box function associated with this OPEN Script dialog box.

Button Group - This field specifies the name of the optional ButtonGroup associated with this OPEN Script dialog box.


Drag
Dragging Out Rectangles

Dragging out rectangles is a dialog box editing technique used in creating and selecting dialog box controls.  To drag out a rectangle, move the mouse to the position in the dialog box where you would like the upper left corner of the final rectangle to be.  Then press and hold the mouse button.  As you move the mouse below and to the right of the original point, a rectangle will appear and change shape so that the lower right corner of the rectangle follows the mouse.  When the rectangle is the desired size, release the mouse button.


Drag And Drop

Drag and drop is a technique used to drag an object from one place to another.  It is used by the Dialog Editor's Control Palette.


Controls
The Control Palette

Click the tool on which you would like information in the picture below:

There are several ways to add new controls to your dialog box.  First, you can select a control from the control palette or from the Controls Menu.   Then, drag out a rectangle and the control of the selected type will be created and sized to that rectangle.

Alternatively, you can use drag and drop to place a control of a default size in your dialog box.  To use this method, move the mouse over the control in the icon palette that you wish to create.  Press and hold the mouse button and move the mouse into the dialog box window.  A rectangle will appear that indicates the placement for the control you are about to create.  If you move the mouse within the dialog box window, the rectangle will follow.  To place the control, release the mouse button.  To abort creating the control, move the mouse outside of the dialog box window and release the button.


Selection Tool
 The Selection Tool

The selection tool is used to manipulate a dialog box's controls.  Modifications to existing controls are typically made by executing commands which act on the currently selected controls in the dialog box.  There are several ways to modify the selection.

Clicking a control with the selection tool active selects that control and deselects any other controls that may be selected.  Pressing the shift key on the keyboard and clicking a control toggles its selection state without modifying the selection state of any of the other controls in the dialog box.

The selection tool may also be used to select a set of controls touching a rectangular region.  Simply drag out a rectangle in the dialog box.  All controls inside or touching the rectangle become the current selection.  Pressing the shift key on the keyboard while dragging out a rectangle adds all controls inside or touching the rectangle to the current selection.

Selected controls look like this:

Some editing commands in the Dialog Editor use size and position attributes of the primary control to modify the size and position attributes of other controls in the selection.  In this example, the cancel button is the primary control.  This is indicated by the wider border around the cancel button.  The first control selected becomes the primary control.  Selected controls can be moved, sized,  deleted and cut or copied to the clipboard.


Tool Bar
The Toolbar

The toolbar is normally visible at the top of the Dialog Editor window (you can hide it using the View Toolbar menu command).  The toolbar contains short cuts for many of the commonly used commands in the Dialog Editor.  Click an icon in the toolbar pictured above to get help on that icon.


Menu
The Menu

File Menu

New

Open

Save

Save As

Recent File

Exit

Edit Menu

Undo

Redo

Cut

Copy

Delete

Paste

Copy Entire Dialog to Clipboard

Check Syntax

Layout Menu

Align Controls

Space Evenly

Center In Dialog

Arrange Buttons

Make Same Size

Size To Content

Set Tab Order

View Menu

Toolbar

Status Bar

Code

Control Palette

Options

Control Menu

Select

Button

OptionButton

Text

TextBox

CheckBox

ListBox

StaticComboBox

DropListBox

DropComboBox

GroupBox

Picture

Help Menu

Contents

Using Help

About OPEN Script Dialog Editor...


  Button Controls

The button control is used to create push buttons in the dialog box. There are three kinds of push buttons in dialog boxes:

Normal Button - These are the most basic push button.  These buttons may have labels and IDs

OK Button - These buttons are like normal buttons except their label cannot be modified and there can only be one OK Button in a dialog box.

Cancel Button - These buttons are like normal buttons except their label cannot be modified and there can only be one Cancel Button in a  dialog box.


 OptionButton Controls

OptionButtons are used to present a set of options to the user of the dialog box.  Every option button belongs to a particular OptionGroup, which is configurable from the OptionButton Group drop down combo box in the OptionButton Properties dialog box.


 Text Controls

Text controls are typically used to label other controls that do not have a visible label.  To use them as a navigation aid, place them immediately before the control they are labeling in the Tab Order .


 TextBox Controls

TextBox controls are used to gather input from the user of the dialog box.  Normally, the TextBox control echos the characters that the user of the dialog box types in.  The No Echo check box in the Text Box Properties dialog box causes the edit control to echo asterisks instead.


 CheckBox Controls

CheckBox controls are used to present the dialog box user with a two-state switch.


 ListBox Controls

ListBox controls are used to present the dialog box user with a list of strings.


 StaticComboBox Controls

StaticComboBox controls are similar to ListBox controls, except that the user may type in a new string instead of selecting one of the strings in the list.


 DropComboBox Controls

DropComboBox controls are similar to DropListBox Controls, except that the user may type in a new string instead of selecting from one of the strings in the list.


 DropListBox Controls

DropListBox controls differ from ListBox controls in appearance only.  Typically, drop list boxes look like this:

If a string from the control is selected, it appears in the control.   When the user clicks the [image], the control expands to present the list of the strings.


 GroupBox Controls

GroupBox controls visually group controls in a dialog box.  In addition, they can be used to provide a navigational hierarchy to the dialog box user.


 Picture Controls

Picture controls are used to place bitmaps into the dialog box.  Picture controls get their contents from either the clipboard or a Windows bitmap (.BMP) file.  The Suppress Message check box in the Picture Properties dialog box causes the picture control not to display the "missing picture" warning if the picture for the dialog box cannot be located.  Pressing the Browse button in the Picture Properties dialog box presents a dialog box used to locate the bitmap for this picture control.  The File is Formula checkbox is used to indicate that the string in the Picture File field is a formula.  The Picture File edit control, the Browse button, and the File is Formula checkbox in the Picture Properties dialog box are disabled if the picture Source is set to Clipboard.


 File New

Keyboard Shortcut: Ctrl + N

Clear the contents of the current dialog box and create the default dialog box.


 File Open

Keyboard Shortcut: Ctrl + O

Replace the contents of the current dialog box with a new dialog box read in from a file.


 File Save

Keyboard Shortcut: Ctrl + S

Write the contents of the current dialog box to a file.


File Save As

Write the contents of the current dialog box to a file with a new name.


Recent
Recent File

List the files most recently opened. The words Recent File appear only if you have not opened any files. Once you have opened a file, this section of the menu displays the filename.


Exit

Keyboard Shortcut: Alt + F4

Close the Dialog Editor.


 Undo

Keyboard Shortcut: Ctrl + Z

Undo the last editing operation.  The number of operations that can be undone is limited by the size of memory and is configurable in the Editor Options dialog box.


Redo

Keyboard Shortcut: Ctrl + R

Re-execute the last undone editing operation.


 Cut

Keyboard Shortcut: Ctrl + X

Copy the current selection to the clipboard and then delete the current selection.


 Copy

Keyboard Shortcut: Ctrl + C

Copy the code for the current selection on the clipboard.  If there is no current selection, this command copies the entire dialog box to the clipboard.


Delete

Keyboard Shortcut: Del

Remove the selected control(s) from the dialog box.


 Paste

Keyboard Shortcut: Ctrl + V

Paste the controls on the clipboard into the current dialog box and make the pasted controls the selection.  If there is an entire dialog box on the clipboard, the current dialog box is replaced with that dialog box.


Dump to Clipboard
Copy Entire Dialog to Clipboard

Copy the contents of the dialog box to the clipboard.


Parse
Check Syntax

Compile the source for the dialog box and verify the syntax. Highlight any syntax errors. This command does not produce an executable file.


 Align Left

Keyboard Shortcut: Ctrl + Right Arrow

Align the selected controls to the left edge of the Primary Control.


 Align Right

Keyboard Shortcut: Ctrl + Right Arrow

Align the selected controls to the right edge of the Primary Control.


 Align Top

Keyboard Shortcut: Ctrl + Up Arrow

Align the selected controls to the top edge of the Primary Control.


 Align Bottom

Keyboard Shortcut: Ctrl + Down Arrow

Align the selected controls to the bottom edge of the Primary Control.


Align Vert. Centers

Keyboard Shortcut: F9

Align the selected controls so that their vertical center is the same as that of the Primary Control.


Align Horiz. Centers

Keyboard Shortcut: Shift + F9

Align the selected controls so that their horizontal center is the same as that of the Primary Control.


Space Evenly Across

Keyboard Shortcut: Alt + Right Arrow

This command is used to equalize the horizontal spacing of three or more selected controls.  The leftmost and rightmost controls are not moved.  The remaining controls are spaced evenly between the leftmost and rightmost controls in their tab order.


Space Evenly Down

Keyboard Shortcut: Alt + Down Arrow

This command is used to equalize the vertical spacing of three or more selected controls.  The topmost and bottommost controls are not moved.  The remaining controls are spaced evenly between the topmost and bottommost controls in their tab order.


Center In Dialog Vertical
 Center Vertically

Keyboard Shortcut: Ctrl + F9

Center the bounding rectangle of the selected controls vertically in the dialog box.


Center In Dialog Horizontal
 Center Horizontally

Keyboard Shortcut: Ctrl + Shift + F9

Center the bounding rectangle of the selected controls horizontally in the dialog box.


Arrange Buttons Right

Keyboard Shortcut: Ctrl + B

This comand lines up the selected buttons on the right side of the dialog box.  The buttons are arranged in tab order from top to bottom.


Arrange Buttons Bottom

Keyboard Shortcut: Ctrl + Shift + B

This command lines up the selected buttons centered on the bottom of the dialog box.  The buttons are arranged in tab order from left to right.


Make Same Size Width
 Make Same Width

Keyboard Shortcut: Ctrl + -

Size the selected controls so that their width is the same as that of the Primary Control.


Make Same Size Height
 Make Same Height

Keyboard Shortcut: Ctrl + \

Size the selected controls so that their height is the same as that of the Primary Control.


Make Same Size Both
 Make Same Size

Keyboard Shortcut: Ctrl + =

Size the selected controls so that their width and height is the same as that of the Primary Control.


Size To Content

Keyboard Shortcut: F7

This command changes the size of various controls to be the right size for the control's contents.  For Text, CheckBox, Button, and OptionButton controls, the controls size is adjusted to accommodate the labels for these controls.  For the picture control, the control is resized to be either the size of the picture or the maximum picture size that preserves apect ratio and fits in the dialog box, whichever is smaller.


Set Tab Order

Keyboard Shortcut: Ctrl + D

The tab order is the order in which focus shifts when the user of the dialog box presses the tab button.  Also, the tab order is used to associate Text controls with the controls they label, that is, the TextBox, ListBox, DropListBox, and StaticComboBox, DropComboBox controls.

When this mode is activated, the tab order of the controls is indicated by the number that appears in the upper left corner of each control.  The control with the number 1 is the control that will receive the focus when the dialog box user runs the dialog box.

The tab order is modified by selecting the controls in the sequence of the new tab order.  The selected control indicates the tab number that you can currently modify.  Selecting a different control inserts that control before the selection in the tab order.  Pressing the tab key moves the selection to the next control in the tab order.  Pressing escape, clicking anything but a control, or reaching the end of the tab list exits the tab order setting mode.


View Toolbar

Show or hide the toolbar.


View Status Bar

Show or hide the Status Bar.


View Code

This command displays a dialog box which shows the OPEN Script code that represents the dialog box being edited.  You may modify this code and press the Update button to replace the current dialog box with the one represented by the code in the dialog box.


View Control Palette

Show or hide the Control Palette.


View Options

Set configuration options for dialog boxes.

Undo Levels is the number of operations that will be remembered for undo (memory permitting).

Word 6 Units indicates whether the input and output units for the dialog box are the units used by Microsoft Word, Version 6.0 or the standard dialog box units.

Grid configures the horizontal and vertical grid size.

Toolbar check boxes affect the display of the toolbar.


Align Controls

This menu contains commands that arrange groups of controls.

Left

Right

Top

Bottom

Vert. Centers

Horiz. Centers


Space Evenly

Space controls Across or Down.


Center In Dialog

Center controls in a dialog either Vertically or Horizontally.


Arrange Buttons

This submenu contains commands that are used to arrange buttons on the right or bottom of the dialog box.


Make Same Size

This submenu contains commands that are used to make controls the same width, height, or size.


 Options

This button brings up the configuration dialog box.

Undo Levels is the number of operations that will be remembered for undo (memory permitting).

Word 6 Units indicates whether the input and output units for the dialog box are the units used by Microsoft Word, Version 6.0 or the standard dialog box units.

Grid configures the horizontal and vertical grid size.

Toolbar check boxes affect the display of the toolbar.


 Grid

The Grid is a layout aid which forces controls to be aligned on at configurable horizontal and vertical intervals.  Turning the grid on and off has no effect on the controls in the dialog box.  Rather, the effect is realized when creating, moving, and sizing controls in the dialog box.

When the grid is turned on, the dialog box will display black dots to indicate the horizontal and vertical alignment intervals.  When controls are sized, the coordinates being modified are aligned to the alignment intervals.  When controls are moved or created, the upper left corner of the controls is aligned to the alignment intervals.  When a control is created by dragging out a rectangle, the lower right corner of the control is aligned as well.


 Context Sensitive Help

This command is used to get context sensitive help.  When you press the [image] toolbar button, the cursor turns into [image].  Clicking most things will display help on that item.  If the item does not have specific help, the Overview is displayed.


Help About
About OPEN Script Dialog Editor

This command displays version and copyright information for the Dialog Editor.


Help Index
Help Contents

This command displays the Overview page of the dialog editor help.


Using Help

This command displays Windows Help, which explains how to use help.