Rational Software Corp.

TOC PREV NEXT INDEX



Using the Rational Rose Script Editor


Contents

This chapter is organized as follows:


The Rose Script Editor

The Rational Rose Script Editor provides an integrated environment for creating, debugging, and compiling scripts that work with the Rose Extensibility Interface.


The Script Editor Window

Figure 7 shows the Script Editor application window.

Figure 7 Rose Script Editor

The Script Editor's application window contains the following elements:


Opening a Script

To open a script in the Script Editor:

1 Click Tools > Open Script.

2 Select the script to open and select OK.

    The script is displayed in a new Script Editor window.


Creating New Rose Scripts

Creating a New Script from Scratch

To create a new script in the Script Editor:

1 Click Tools > New Script.

2 Enter your script in the new Script Editor window.

3 Enter your script text.

4 Click File > Save As and save the new script.

Creating a New Script from an Existing Script

To create a new script from an existing script:

1 Click Tools > Open Script.

2 Select a file from the list of available scripts.

3 Click OK to enter the Script Editor and display the script.

4 Select the script text and click Copy to save the script text to the Clipboard.

5 Click Tools > New Script.

6 Click Paste to paste the existing script text into the new script window.

7 Click File > Save As and save the new script.


Selecting a Font for the Script Editor

When you create a new script or edit an existing script, you can select the text font in the Watch and Edit panes of the Script Editor window.

To select a font for the Script Editor:

1 To make sure the Script Editor window has the focus, do one of the following:

2 Click Edit > Font to display the Font dialog box.

3 Select the font, font style, size, and script. (For information about each option, click the question mark, and then click the option.)

    A sample of the selected font appears in the Sample box.

4 Click OK.

    The text in the Watch and Edit panes of the Script Editor appears in the selected font.


Moving the Insertion Point in a Script

There are two ways to move the insertion point in a script:

Moving the Insertion Point with the Mouse

This approach is useful when the area of the screen to which you want to move the insertion point is currently visible.

To move the insertion point with the mouse:

1 Use the scroll bars at the right and bottom of the display to scroll the target area of the script into view if it is not already visible.

2 Place the mouse pointer where you want to position the insertion point.

3 Click the left mouse button.

    The insertion point is repositioned.

Note: When you scroll the display with the mouse, the insertion point remains in its original position until you reposition it with a mouse click. If you attempt to perform an editing operation when the insertion point is not in view, the Script Editor automatically scrolls the insertion point into view before performing the operation.

Moving the Insertion Point to a Specified Line in Your Script

This approach is useful when the area of the screen to which you want to move the insertion point is not currently visible but you know the number of the target line.

To move the insertion point to a specified line:

1 Click Edit > Goto Line.

    The Script Editor displays the Goto Line dialog box.

Figure 8 Goto Line Dialog Box

2 Enter the number of the line in your script to which you want to move the insertion point.

3 Click OK or press ENTER.

4 The insertion point is positioned at the start of the line you specified. If that line was not already displayed, the Script Editor scrolls it into view.

    Note: The insertion point cannot be moved so far below the end of a script as to scroll the script entirely off the display. When the last line of your script becomes the first line on your screen, the script will stop scrolling, and you will be unable to move the insertion point below the bottom of that screen.


Selecting Text

There are three ways to select text in an open script:

Selecting Text with the Mouse

To use the mouse to select text in your script:

1 Place the mouse pointer where you want your selection to begin.

2 Do one of the following:

Figure 9 Selected Script Text

Selecting Text with the Keyboard

To use keyboard shortcuts to select text in your script:

1 Place the insertion point where you want your selection to begin.

2 While pressing SHIFT, use one of the navigating keyboard shortcuts to extend the selection to the desired ending point.

    The selected text is highlighted on your display.

Selecting an Entire Line

To use the keyboard to select one or more whole lines in your script:

1 Place the insertion point at the beginning of the line you want to select.

2 Press SHIFT + DOWN ARROW.

    The entire line, including the end-of-line character, is selected.

3 To extend your selection to include additional whole lines of text, repeat step 2.


Deleting, Cutting, Copying, and Pasting Text

Deleting Text

Do one of the following to remove characters, selected text, or entire lines from your script:

Cutting a Selection

To cut text from your script and place it on the Clipboard, press CTRL+X.

Copying a Selection

To copy text from your script and place it on the Clipboard, press CTRL+C.

Pasting the Contents of the Clipboard into Your Script

To paste the contents of the Clipboard into your script:

1 Position the insertion point where you want to place the contents of the Clipboard.

2 Press CTRL+V.


Adding Comments to a Script

There are two types of comments you can add to a script:

Adding a Full-Line Comment

To designate an entire line as a comment:

1 Type an apostrophe ( ' ) at the start of the line.

2 Type your comment following the apostrophe.

When your script is run, the presence of the apostrophe at the start of the line will cause the entire line to be ignored.

Adding a Comment at the End of a Line of Code

To designate the last part of a line as a comment:

1 Position the insertion point in the empty space beyond the end of the line of code.

2 Type an apostrophe ( ' ).

3 Type your comment following the apostrophe.

When your script is run, the code on the first portion of the line will be executed, but the presence of the apostrophe at the start of the comment will cause the remainder of the line to be ignored.


Finding and Replacing Text

Finding Specified Text

To locate instances of specified text quickly anywhere within your script:

1 Move the insertion point to where you want to start your search. To start at the beginning of your script, press CTRL+HOME.

2 Press CTRL+F.

    The Script Editor displays the Find dialog box.

Figure 10 Find Dialog Box

3 In the Find what box, specify the text you want to find or select it from the list of previous searches.

4 Click Find Next or press ENTER.

    The Find dialog box remains displayed, and the Script Editor either highlights the first instance of the specified text or indicates that it cannot be found.

5 If the specified text has been found, repeat step 4 to search for the next instance of it.

    Note: If the Find dialog box blocks your view of an instance of the specified text, you can move the dialog box out of your way and continue with your search.

6 To remove the Find dialog box while maintaining the established search criteria, click Cancel.

7 Press F3 to find successive occurrences of the specified text.

    Note: If you press F3 when you have not previously specified text for which you want to search, the Script Editor displays the Find dialog box so you can specify the desired text.

Replacing Specified Text

To automatically replace either all instances or selected instances of specified text:

1 Move the insertion point to where you want to start the replacement operation. To start at the beginning of your script, press CTRL+HOME.

2 Click Edit > Replace.

    The Script Editor displays the Replace dialog box.

Figure 11 Replace Dialog Box

3 In the Find what box, specify the text you want to replace or select it from the list of previous searches.

4 In the Replace with box, specify the replacement text or select it from the list of previous replacements.

5 To replace selected instances of the specified text, click Find Next.

    The Script Editor either highlights the first instance of the specified text or indicates that it cannot be found.

6 If the specified text has been found, either click Replace to replace that instance of it or click Find Next to highlight the next instance (if any).

    Each time you click Replace, the Script Editor replaces that instance of the specified text and automatically highlights the next instance.


Running, Pausing, and Stopping Your Script

Running Your Script

To compile and run your script from within the Script Editor, click Go on the toolbar or press F5.

The script is compiled (if it has not already been compiled), the focus is switched to the parent window, and the script is executed.

Note: During script execution, the Script Editor's application window is available only in a limited manner. Some of the menu commands may be unavailable, and the toolbar tools may be inoperative.

You can also use the Application Class ExecuteScript method to run scripts. See the online Help for details.

Pausing an Executing Script

To suspend the execution of a script that you are running, press CTRL+BREAK.

Execution of the script is suspended, and the instruction pointer (a gray highlight) appears on the line of code where the script stopped executing.

Note: The instruction pointer designates the line of code that will be executed next if you resume running your script.

Stopping an Executing Script

To stop the execution of a script that you are running:

1 If it is not paused, pause the script.

2 Click StopDebugging on the toolbar or press SHIFT+F5.

Note: Many of the functions of the Script Editor's application window may be unavailable while you are running a script. If you want to stop your script, but find that the toolbar is currently inoperative, press CTRL+BREAK to pause your script, then click StopDebugging.


Tracing Script Execution

Stepping Through Your Script

To trace the execution of your script with either the StepInto or StepOver method:

1 Do one of the following:

    The Script Editor places the instruction pointer on the sub main line of your script.

    Note: When you initiate execution of your script using either of these methods, the script will first be compiled, if necessary. Therefore, there may be a slight pause before execution actually begins. If your script contains any compile errors, it will not be executed. To debug your script, first correct any compile errors, and then execute it again.

2 To continue tracing the execution of your script, repeat step 1.

    Each time you repeat step 1, the Script Editor executes the line or the procedure that contains the instruction pointer and then moves the instruction pointer to the next line or procedure to be executed.

3 When you finish tracing the execution of your script, either click Go on the toolbar (or press F5) to run the script at full speed or click Stop Debugging to halt execution of the script.

Displaying the Calls Dialog Box

When you are stepping through a subroutine, you may need to determine the procedure calls by which you arrived at that point in your script.

To use the Calls dialog box to obtain this information:

1 Click Calls on the toolbar.

    The Script Editor displays the Calls dialog box, which lists the procedure calls made by your script in the course of arriving at the present subroutine.

Figure 12 Script Calls Dialog Box

2 Select the name of the procedure you wish to view.

3 Click Show.

    The Script Editor highlights the currently executing line in the procedure you selected, scrolling that line into view if necessary. (During this process, the instruction pointer remains in its original location in the subroutine.)


Setting and Removing Breakpoints

You set and remove breakpoints in your script as part of the debugging process.

Starting Debugging Partway Through a Script

To begin the debugging process at a selected point in your script:

1 Place the insertion point in the line where you want to start debugging.

2 To set a breakpoint on that line, click Toggle Breakpoint on the toolbar or press F9.

    The line on which you set the breakpoint now appears in contrasting type.

3 Click Go on the toolbar or press F5.

    The Script Editor runs your script at full speed from the beginning and then pauses prior to executing the line containing the breakpoint. It places the instruction pointer on that line to designate it as the line that will be executed next when you either proceed with debugging or resume running the script.

Continuing Debugging at a Line Outside the Current Subroutine

You can continue debugging at a line that is not within the same subroutine.

To move the instruction pointer to that line:

1 Place the insertion point in the line where you want to continue debugging.

2 To set a breakpoint on that line, click Toggle Breakpoint on the toolbar or press F9.

    The line on which you set the breakpoint now appears in contrasting type.

3 Click Go on the toolbar or press F5.

    The Script Editor runs your script at full speed from the beginning and then pauses prior to executing the line containing the breakpoint. It places the instruction pointer on that line to designate it as the line that will be executed next. You can now resume stepping through your script from that point.

Debugging Selected Portions of Your Script

You can use breakpoints if you only need to debug parts of your script.

To debug selected portions of your script by using breakpoints:

1 Place a breakpoint at the start of each portion of your script that you want to debug.

    Note: Up to 255 lines in your script can contain breakpoints.

2 Click Go on the toolbar or press F5.

    The script executes at full speed until it reaches the line containing the first breakpoint and then pauses with the instruction pointer on that line.

3 Step through as much of the code as you need to.

4 To resume running your script, click Go on the toolbar or press F5.

    The script executes at full speed until it reaches the line containing the second breakpoint and then pauses with the instruction pointer on that line.

5 Repeat steps 3 and 4 until you have finished debugging the selected portions of your script.

Removing a Single Breakpoint Manually

To delete breakpoints manually one at a time:

1 Place the insertion point on the line containing the breakpoint that you want to remove.

2 Click Toggle Breakpoint on the toolbar or press F9.

    The breakpoint is removed, and the line no longer appears in contrasting type.

Removing All Breakpoints Manually

To delete all breakpoints manually in a single operation, click Debugger > Clear All Breakpoints.


Working with Watch Variables

Watch variables allow you to track the changing values of variables in a script.

Adding Watch Variables

To add a variable to the Script Editor's watch variable list:

1 Click Add Watch on the toolbar or press SHIFT+F9.

    The Script Editor displays the Add Watch dialog box.

Figure 13 Add Watch Dialog Box

2 In the Variable list, enter the name of the variable you want to add to the watch variable list.

    Note: If you are executing the script, you can display the names of all the variables that are "in scope," or defined within the current function or subroutine, in the Variable drop-down list and select the variable you want from that list.

3 In the Procedure box, enter the name of the RoseScript subroutine or function whose variable you want to add to the watch variable list. For example, Main for the Main subroutine, Area for the Area function,

4 In the Script box, enter the name of the RoseScript without the .ebs extension whose variable you want to add to the watch variable list. For example, CountClasses for the CountClasses.ebs RoseScript.

5 Click OK or press ENTER.

    If this is the first variable you are placing on the watch variable list, the watch pane opens far enough to display that variable. If the watch pane was already open, it expands far enough to display the variable you just added.

    Note: Although you can add as many watch variables to the list as you want, the watch pane only expands until it fills half of the Script Editor's application window. If your list of watch variables becomes longer than that, you can use the watch pane's scroll bars to bring hidden portions of the list into view.

Selecting Variables on the Watch List

To delete a variable from the Script Editor's watch variable list or modify the value of a variable on the list, do one of the following:

Deleting Watch Variables

To delete a selected variable from the Script Editor's watch variable list:

1 Select the variable on the watch list.

2 Click Debugger > Delete Watch, or press DELETE.

Modifying the Value of Variables on the Watch Variable List

When the debugger has control, you can modify the value of any of the variables on the Script Editor's watch variable list.

To change the value of a selected watch variable.

1 Do one of the following:

    The Script Editor displays the Modify Variable dialog box.

Figure 14 Modify Variable Dialog Box

    Note: The name of the variable you selected on the watch variable list appears in the Name box.

2 In the Value box, enter the new value for your variable.

3 Click OK.

    The new value of your variable appears on the watch variable list.


Compiling Your Script

To create compiled script files from your script source:

1 Click Tools > Open Script and select the file that contains the script you want to compile.

2 Click Debugger > Compile or press F7.

3 Enter the name of the file in which to save the compiled script and select OK.

    The script is compiled and saved in a file with a .ebx extension.

    Note: You can also use the Application.CompileScriptFile method to compile scripts. See the online Help for more details.


Using Interscript Calls

Guidelines for Using a Script to Call Another Script

You can write a script that includes code that calls and executes another script. The following guidelines apply to this process:

Debugging Interscript Calls

To debug a script that uses interscript calls:

1 Enter the call to the compiled script you are including and set a breakpoint on the call.

2 Click Debugger > StepInto.

    The Script Editor displays the source code for the compiled script you are calling, and steps through it line by line.

    When the trace of the called script is complete, the Script Editor redisplays the calling script.

Note: The script you are calling must be compiled with debugging turned on. See Compiling Your Script for details.


Working with the Dialog Editor

Inserting a Dialog Box into Your Script

To insert a dialog box into your script:

1 Place the insertion point where you want the BasicScript code for the dialog box to appear in your script.

2 Click Edit > Insert Dialog.

    The Script Editor's application window is temporarily unavailable, and Dialog Editor appears, displaying a new dialog box in its application window.

3 Use the Dialog Editor to create your dialog box.

4 Click File > Exit and Return from the Dialog Editor menu to return to the Script Editor.

    The Script Editor automatically places the code for the dialog box in your script at the location of the insertion point.

Editing an Existing Dialog Box

To edit an existing dialog box template in your script:

1 Select the BasicScript code for the entire dialog box template.

2 Click Edit > Edit Dialog.

    The Script Editor's application window is temporarily unavailable, and the Dialog Editor appears, displaying in its application window a dialog box created from the code you selected.

a Use the Dialog Editor to modify your dialog box.

b Click File > Exit and Return from the Dialog Editor menu to return to the Script Editor.

    The Script Editor automatically replaces the BasicScript code you originally selected with the revised code generated by the Dialog Editor.

Displaying and Adjusting the Grid

The X and Y settings help you position controls more precisely within your dialog box. The values of X and Y in the Grid dialog box determine the grid's spacing. Assigning smaller X and Y values produces a more closely spaced grid, which enables you to move the mouse pointer in smaller horizontal and vertical increments as you position controls. Assigning larger X and Y values produces the opposite effect on both the grid's spacing and the movement of the mouse pointer. The X and Y settings entered in the Grid dialog box remain in effect regardless of whether you choose to display the grid.

To display and adjust the grid:

1 Press CTRL+G.

    The Dialog Editor displays the Grid dialog box.

Figure 15 Grid Dialog Box

2 To display the grid in your dialog box, select the Show grid check box.

3 Enter new values in the Horizontal (X) and Vertical (Y) boxes.

4 Click OK or press ENTER.

    The Dialog Editor displays the grid with the settings you specified.

Figure 16 Dialog Editor with Grid Displayed

5 With the grid displayed, line up the crosshairs on the mouse pointer with the dots on the grid to position controls precisely and align them with other controls.

Changing Titles and Labels

To change the title of a dialog box, as well as the labels of group boxes, option buttons, push buttons, text controls, and check boxes:

1 Display the Information dialog box for the dialog box whose title you want to change or for the control whose label you want to change.

2 Enter the new title or label in the Text$ box.

    Note: Dialog box titles and control labels are optional. Therefore, you can leave the Text$ box blank.

3 If the information in the Text$ box should be interpreted as a variable name rather than a literal string, select the Variable Name check box.

4 Click OK or press ENTER.

    The new title or label is now displayed on the title bar or on the control.

Assigning Accelerator Keys

To designate a letter from a control's label to serve as the accelerator key for that control.

1 Display the Information dialog box for the control to which you want to assign an accelerator key.

2 In the Text$ box, type an ampersand (&) before the letter you want to designate as the accelerator key.

3 Click OK or press ENTER.

    The letter you designated is now underlined on the control's label, and users will be able to access the control by pressing ALT + the underlined letter.

Capturing Standard Windows Dialog Boxes

To capture the standard Windows controls from any standard Windows dialog box in another application, and insert those controls into the Dialog Editor for editing:

1 Display the dialog box you want to capture.

2 Open the Dialog Editor.

3 Click File > Capture Dialog.

    The Dialog Editor displays the Select the Dialog Box to Capture dialog box.

Figure 17 Capturing a Dialog Box

4 Select the dialog box that you want to capture, then click OK.

    Note: The Dialog Editor only supports standard Windows controls and standard Windows dialog boxes. Therefore, if the target dialog box contains both standard Windows controls and custom controls, only the standard Windows controls will appear in the Dialog Editor's application window. If the target dialog box is not a standard Windows dialog box, you will be unable to capture the dialog box or any of its controls.

Testing Your Dialog Boxes

The Dialog Editor lets you run your edited dialog box for testing purposes. When you click Test Dialog, your dialog box becomes functional, which gives you an opportunity to make sure it functions properly and fix any problems before you incorporate the dialog box template into your script.

Before you run your dialog box, take a moment to look it over for basic problems such as the following:

Testing your dialog box is an iterative process that involves running the dialog box to see how well it works, identifying problems, stopping the test, and fixing those problems. You can then run the dialog box again to make sure the problems are fixed and to identify any additional problems, and do so until the dialog box functions the way you intend.

To test your dialog box and fine-tune its performance:

1 Click Test Dialog on the toolbar, or press F5, to make the dialog box operational.

2 Check the dialog box's functions.

3 To stop the test, click Test Dialog, press F5, or click the dialog box's close box (if it has one).

4 Make any necessary adjustments to the dialog box.

5 Repeat steps 1-4 as many times as you need in order to get the dialog box working properly.

Incorporating Dialog Boxes or Controls into Your Script

You create dialog boxes and dialog box controls in the Dialog Editor. To incorporate them into a script, you copy them to the Clipboard. When you copy the dialog box to the Clipboard, it is stored in the form of Basic Script statements. You then paste the contents of the Clipboard into the script.

To incorporate a dialog box or control into your script:

1 Select the dialog box or control that you want to incorporate into your script.

2 Press CTRL+C.

3 Open your script and paste the contents of the Clipboard at the desired point.

    The dialog box template or control appears in BasicScript statements in your script, as shown in Figure 18.

Figure 18 Sample Dialog Box in Basic Script

.

Selecting Controls

To select a control in a dialog box, do one of the following:

Selecting Dialog Boxes

To select an entire dialog box, do one of the following:

Repositioning Items

Repositioning Items with the Mouse

The increments by which you can move a control with the mouse are governed by the grid setting. For example, if the grid's X setting is 4 and its Y setting is 6, you will be able to move the control horizontally only in increments of 4 X units and vertically only in increments of 6 Y units. This feature is useful if you are trying to align controls in your dialog box. See Displaying and Adjusting the Grid.

To reposition an item in a dialog box or control by dragging it with the mouse:

1 With the Pick tool active, place the mouse pointer on an empty area of the dialog box or on a control.

2 Press the mouse button and drag the dialog box or control to the desired location.

Repositioning Items with the Arrow Keys

To reposition an item in a dialog box or control by dragging it with the arrow keys:

1 Select the dialog box or control that you want to move.

2 Do one of the following:

    Note: When you reposition an item with the arrow keys, a faint, partial afterimage of the item may remain visible in the item's original position. These afterimages disappear once you test your dialog box.

Repositioning Dialog Boxes with the Dialog Information Dialog Box

To reposition items in a dialog box or control by using the Dialog Information dialog box:

1 Display the Dialog Box Information dialog box.

    Note: For information on displaying the Dialog Information dialog box, see Displaying the Information Dialog Boxes for Dialog Boxes.

2 Do one of the following:

3 Click OK or press ENTER.

    If you specified X and Y coordinates, the dialog box moves to that position. If you left the X coordinate blank, the dialog box will be centered horizontally relative to the parent window of the dialog box when the dialog box is run. If you left the Y coordinate blank, the dialog box will be centered vertically relative to the parent window of the dialog box when the dialog box is run.

Repositioning Controls with the Dialog Information Dialog Box

To move a selected control by changing its coordinates in the Dialog Information dialog box for that control:

    Note: For information on displaying the Dialog Information dialog box, see Displaying the Information Dialog Boxes for Controls.

1 Display the Information dialog box for the control that you want to move.

2 Change the X and Y coordinates in the Position group box.

3 Click OK or press ENTER.

    The control moves to the specified position.

Resizing Items

Resizing Items with the Mouse

To change the size of a selected dialog box or control by dragging its borders or corners with the mouse:

1 With the Pick tool active, select the dialog box or control that you want to resize.

2 Place the mouse pointer over a border or corner of the item.

3 Depress the mouse button and drag the border or corner until the item reaches the desired size.

Resizing Items with the Information Dialog Box

To change the size of a selected dialog box or control by changing its Width or Height settings in the Information dialog box:

1 Display the Information dialog box for the dialog box or control that you want to resize.

2 Change the Width and Height settings in the Size group box.

3 Click OK or press ENTER.

    The dialog box or control is resized to the dimensions you specified.

Resizing Selected Items Automatically

To adjust the borders of certain controls automatically to fit the text displayed on them:

1 With the Pick tool active, select the option button, text control, push button, check box, or text box that you want to resize.

2 Press F2.

    The borders of the control will expand or contract to fit the text displayed on it.

Adding Controls

To add one or more controls to your dialog box using simple mouse and keyboard methods.

1 From the toolbar, choose the tool corresponding to the type of control you want to add.

    Note: When you pass the mouse pointer over an area of the display where a control can be placed, the pointer becomes an image of the selected control with crosshairs (for positioning purposes) to its upper left. The name and position of the selected control appear on the status bar. When you pass the pointer over an area of the display where a control cannot be placed, the pointer changes into a circle with a slash through it (the "prohibited" symbol).

    Note: You can only insert a control within the borders of the dialog box you are creating. You cannot insert a control on the dialog box's title bar or outside its borders.

2 Place the pointer where you want the control to be positioned and click the mouse button.

    The control you just created appears at the specified location. The upper left corner of the control corresponds to the position of the pointer's crosshairs at the moment you clicked the mouse button. The control is surrounded by a thick frame, which means that it is selected, and it may also have a default label.

    After the new control appears, the mouse pointer becomes an arrow, to indicate that the Pick tool is active and you can once again select any of the controls in your dialog box.

3 To add another control of the same type as the one you just added, press CTRL+D.

    A duplicate copy of the control appears.

4 To add a different type of control, repeat steps 1 and 2.

5 To reactivate the Pick tool, do one of the following:

Duplicating Controls

You can use the Dialog Editor's duplicating feature to create one or more copies of a particular control.

To duplicate controls:

1 Select the control that you want to duplicate.

2 Press CTRL+D.

    A duplicate copy of the selected control appears in your dialog box.

3 Repeat step 2 as many times as necessary to create the desired number of duplicate controls.

Adding Pictures to a Dialog Box

You can add pictures to a dialog box from a file or from a picture library.

Adding Pictures from Files

You can display a Windows bitmap or metafile from a file on a picture control or picture button control by using the control's Information dialog box to indicate the file in which the picture is contained.

To add pictures from files:

1 Display the Information dialog box for the picture control or picture button control whose picture you want to specify.

2 In the Picture source option button group, click File.

3 In the Name$ box, enter the name of the file containing the picture you want to display in the picture control or picture button control.

    Note: By clicking the Browse button, you can display the Select a Picture File dialog box and use it to find the file.

4 Click OK or press ENTER.

    The picture control or picture button control displays the picture you specified.

Adding Pictures from Picture Libraries

You can display a Windows bitmap or metafile from a file on a picture control or picture button control by using the control's Information dialog box to indicate the file in which the picture is contained.

To add pictures from picture libraries:

1 Display the Information dialog box for the picture control or picture button control whose picture you want to specify.

2 In the Picture source option button group, click File.

3 In the Name$ box, enter the name of the file containing the picture you want to display in the picture control or picture button control.

    Note: By clicking the Browse button, you can display the Select a Picture File dialog box and use it to find the file.

4 Click OK or press ENTER.

    The picture control or picture button control displays the picture you specified.

Pasting Items into Dialog Editor

Pasting Existing Dialog Boxes into the Dialog Editor

You can modify a BasicScript dialog box template contained in your script by selecting the template and pasting it into the Dialog Editor for editing.

To paste dialog boxes into the Dialog Editor:

1 Copy the entire BasicScript dialog box template (from the Begin Dialog instruction to the End Dialog instruction) from your script to the Clipboard.

2 Open the Dialog Editor.

3 Press CTRL+V.

4 When the Dialog Editor asks whether you want to replace the existing dialog box, click Yes.

    The Dialog Editor creates a new dialog box corresponding to the template contained on the Clipboard.

Pasting Controls from Existing Dialog Boxes into the Dialog Editor

You can modify the BasicScript statements in your script that correspond to one or more dialog box controls by selecting the statements and pasting them into Dialog Editor for editing.

To paste controls into the Dialog Editor:

1 Copy the BasicScript description of the control(s) from your script to the Clipboard.

2 Open the Dialog Editor.

3 Press CTRL+V.

    The Dialog Editor adds to your current dialog box one or more controls corresponding to the description contained on the Clipboard.

Displaying the Information Dialog Boxes

There are two types of Information dialog boxes:

Displaying the Information Dialog Boxes for Dialog Boxes

To display the Dialog Box Information dialog box to check and adjust attributes that pertain to the dialog box as a whole, do one of the following:

Figure 19 Dialog Box Information Dialog Box

Attributes You Can Adjust with the Dialog Box Information Dialog Box

The Dialog Box Information dialog box can be used to check and adjust the following attributes, which pertain to the dialog box as a whole:

Displaying the Information Dialog Boxes for Controls

To display the Information dialog box for a control to check and adjust attributes that pertain to that particular control, do one of the following:

Figure 20 Control Information Dialog Box

Attributes You Can Adjust with the Information Dialog Boxes for Controls

Control Information dialog boxes can be used to check and adjust the attributes of the following controls:


Rational Software Corporation  http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX