Interface Designer Guide - Support - IBM

10 downloads 2427 Views 941KB Size Report
of controls to a form and how to set control properties. •Chapter 4, “Creating ..... From the Active Control list box, select the border color for the active control. ..... properties. This section describes the specific properties for a combo box control.
SA-Application Software Expert Version 5.0

Interface Designer Guide

Copyright © 1997 by Software Artistry, Inc. All rights reserved

All rights to this publication are reserved. No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose other than the purchaser’s personal use without the written permission of Software Artistry, Inc. SA-Application Software Expert and SA-Expert Advisor are trademarks of Software Artistry, Inc. IBM, OS/2, DB2/2, and ECCO are registered trademarks of International Business Machines Corp. Microsoft , Windows, Windows NT, and Windows 95 are registered trademarks of Microsoft Corp. Oracle, Oracle 7, SQL*DBA, SQL*Net, and SQL*Plus are trademarks of Oracle Corp. SYBASE, Transact-SQL, and DB-Library are trademarks of Sybase, Inc. Crystal Reports is a trademark of Crystal Technology, Inc. Any other products mentioned in this document are trademarks of their respective companies.

Table of Contents Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5 About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 Purpose of This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Audience Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Overview of the Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 The SA-ASE 5.0 Documentation Set . . . . . . . . . . . . . . . . . . . . . 12

Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . .13 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Resource Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Starting and Quitting the Interface Designer . . . . . . . . . . . . . . . . 16 OK and Apply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Customizing the Interface Designer with Preferences . . . . . . . . . 18

Chapter 2 Designing Forms. . . . . . . . . . . . . . . . . . . . . . .21 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Opening Resource Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Working with Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Chapter 3 Designing Controls . . . . . . . . . . . . . . . . . . . . .31 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Overview to Control Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Common Control Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Specific Control Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Working with Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Chapter 4 Designing Notebooks . . . . . . . . . . . . . . . . . . .59 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Notebook Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Using Notebook Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Creating Notebook Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Working with Notebook Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Chapter 5 Building Additional Features. . . . . . . . . . . . . . .69 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Pattern Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Formatting Text Boxes with Patterns . . . . . . . . . . . . . . . . . . . . . 72 Creating Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Creating and Working with Toolbars . . . . . . . . . . . . . . . . . . . . . 80 Creating Hypertext Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Creating Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Chapter 6 Using Forms in SA-Script Programs . . . . . . . . . .91 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Form Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Parsing Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

Appendix Geometry Management . . . . . . . . . . . . . . . . .95 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Dialog Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105

Acknowledgements

No one who writes documentation for software does so alone. It is impossible to produce good documentation without the knowledge and help of the people who create the software and understand its function for the end user. The following people deserve much credit in the development of the SA-ASE 5.0 Interface Designer Guide.

The development team

The members of the development team for this project were: • Dave Marquam • Carl Sampson • Sean Vyain • Doug Wood

The editors

The editors for this project were: • Danna Cardwell • Anne Block

6

SA-Application Software Expert 5.0

About This Guide

This chapter covers the following topics: •Purpose of This Book •Audience Considerations •Overview of the Contents •Document Conventions •The SA-ASE 5.0 Documentation Set

Purpose of This Book What this book contains

The SA-ASE 5.0 Interface Designer Guide is a reference book that describes the Interface Designer. This new tool can be used to create forms, menus, toolbars, patterns, and string tables for SA-Script GUI applications.

What you will be able to do

This book serves as a reference guide when you: •Create forms, menus, toolbars, and string tables for GUI applications •Create notebooks •Test forms and their controls •Use forms in an SA-Script program

Audience Considerations Who should read this book

This book is intended for users who configure and customize SA-Script applications at your site.

What you should know before beginning

Before you use this book, you should be familiar with: • The SA-ASE development tools • Customization practices at your site, and how your function relates to the customization process • Operating systems used at your site

8

SA-Application Software Expert 5.0

Overview of the Contents

Overview of the Contents What is in this book

The SA-ASE 5.0 Interface Designer Guide contains the following chapters. Primary chapter topics are noted as well. •Chapter 1, “Introduction,” discusses the basic features of the Interface Designer. •Chapter 2, “Designing Forms,” discusses resource files, forms, and how to create basic forms. •Chapter 3, “Designing Controls,” discusses the addition of controls to a form and how to set control properties. •Chapter 4, “Creating Notebooks,” discusses how to build a notebook in the Interface Designer. •Chapter 5, “Building Additional Features,” discusses how to format text boxes with patterns, how to design menus and toolbars, how to use string editors, and how to create hypertext controls. •Chapter 6, “Using Forms in an SA-Script Program,” discusses how forms are called by a SA-Script program. •Appendix, “Geometry Management,” discusses the sizing relationship of controls to forms and how to manage them.

How to use this book

This book is intended as a reference to assist you in using the Interface Designer. You can refer to any part of the book without reading preceding chapters.

Interface Designer Guide

9

Document Conventions Introduction

There are several conventions used throughout this book to identify different text use or to point out particularly important information.

Instructions for Windows, OS/2, and UNIX users

This book contains only one set of instructions for the Windows, OS/2, and UNIX operating systems. Procedures should be the same for all operating systems. Graphics for this guide were created in the Windows 95 operating system.

Procedure methods

There is often more than one way to accomplish a task using the Interface Designer. Instructions appear in one of the following methods: •Menu •Pop-up menu •Double-clicking an object

Text use

• Italic text is used in procedures to indicate text that you must substitute in the course of a procedure. Type the file name: SAIDEV Note: UNIX file names do not necessarily have extensions. • Italic text is also used for new terms. client/server architecture • Bold text is used for variable and data source names when they appear in text references. SQLFetch

10

SA-Application Software Expert 5.0

Document Conventions

• Bold text also denotes text that you must type, either at a command prompt or in a text box. Type login • Monospace fonts are used for code examples. Function Add Data : INTEGER IS

Icons used in this book

Icons appear occasionally as a means of emphasizing a particularly important point. Always read notes. Notes are important points that you should understand. They offer important information, and they explain special circumstances. The following is an example of a note.

Note: This is an example of a note.

Cautions occur when user actions might adversely affect data integrity.

Caution: This is an example of a caution.

Product names

Software Artistry products are referred to by the following names throughout the documentation set: Product Name

Referred to as

SA-EXPERTISE for CRM

EXPERTISE

SA-EXPERTISE for ESM

EXPERTISE

SA-Application Software Expert

ASE

SA-Expert Administrator

Expert Administrator

SA-Expert Advisor

Expert Advisor

SA-Expert Evolution

Expert Evolution

TM TM

Interface Designer Guide

11

Product Name

Referred to as

SA-Expert Foundation Manager

Expert Foundation Manager

SA-Expert Mail Agent

Expert Mail Agent

SA-Expert Quality

Expert Quality

SA-Expert Support

Expert Support

SA-ExpertView

ExpertView

SA-Expert Web

Expert Web

The SA-ASE 5.0 Documentation Set Other books in the set

The following books, in addition to the SA-ASE 5.0 Interface Designer Guide, comprise the total SA-ASE documentation set: • SA-ASE 5.0 Tools and Utilities Guide - A book that describes the SA-ASE Integrated Development Environment and the various tools contained in it. The book provides detailed information and procedures to help you learn to use the tools in your environment. • SA-ASE 5.0 SA-Script Language Reference - A book that provides command references for SA-Script and for the APIs used with SA-Script. The command references include syntax, return codes, and system constants. • SA-ASE 5.0 SA-Script Programming Guide - A book that provides information about SA-ASE and the SA-Script programming language. • SA-ASE 5.0 Legacy APIs Guide - A book that contains information about the EHLLAPI and CPIC APIs in SA-ASE. • SA-ASE 5.0 SA-Script Text Retrieval Guide - A reference book that explains the use of the Fulcrum SearchServer text retrieval engine. • SA-ASE 5.0 Tutorials - A book that contains tutorial exercises for the primary functions found in SA-ASE.

12

SA-Application Software Expert 5.0

Introduction 1

This chapter covers the following topics: •Overview •Forms •Starting and Quitting the Interface Designer •Customizing the Interface Designer with Preferences

1

Introduction

Overview What is the Interface Designer?

The Interface Designer is the tool used to create forms, menus, toolbars, and string tables for SA-Script GUI applications that you build.

Terminology conventions

The following terms are used frequently in this book: •form - forms are created in the course of application development. Forms are used to create both dialog boxes and windows. •resource file - a resource file is the file that you create within the Interface Designer when you create forms. Each resource file can contain multiple forms. •dialog box - in this book, a dialog box refers to a part of the Interface Designer. Any dialog box that is part of the Interface Designer is referred to by its full name, followed by the words “dialog box,” such as, “the Preferences dialog box.” •notebook - a notebook is a form that categorizes or organizes other forms. Forms contained in a notebook are considered subforms; the notebook is the top-level form. (A notebook is similar to a directory, subforms are similar to subdirectories.)

Forms Introduction

14

Forms provide an integral component to any GUI application. Forms present information to, and receive information from, end users.

SA-Application Software Expert 5.0

Resource Files Description of forms

Forms are special windows that can contain numerous types of controls. Controls are objects on a form that can be manipulated by the end user. Examples of controls include option buttons, text boxes, and check boxes.

Process used to build forms

The process of building a form involves the following steps. 1. Creating or opening a resource file. 2. Adding a new form to the resource file. 3. Customizing the form properties, size, and position. 4. Adding controls to the form. 5. Customizing the control properties, size, and position. 6. Saving the control properties, size, and position. 7. Saving the resource file (the file parses automatically when saved). 8. Testing the forms in the resource file.

Resource Files Introduction

Resource files (also known as .df files) are the physical text files created when you create definitions for forms. With the Interface Designer, you can open the resource file first, then access any form associated with the file.

Interface Designer Guide

15

1

Introduction

Starting and Quitting the Interface Designer Starting the Interface Designer

There are several ways to launch the Interface Designer depending on your operating system. The following are GUI procedures for Windows, OS/2, or X Motif for UNIX. You can also start the I-Designer from the command prompt of any supported operating system mentioned. To start the Interface Designer:

If you are using... Windows 95 or NT 4.0

then... • From the Start menu, point to Program, point to SA-ASE, and then choose SA-Interface Designer. Result: The Interface Designer window appears.

Windows NT 3.5.1

• In the SA-Application Software Expert folder, choose the Interface Designer icon. Result: The Interface Designer window appears.

OS/2

• In the SA-Application Software Expert folder, choose the Interface Designer icon. Result: The Interface Designer window appears.

X-Motif on UNIX

1. Make sure that the directory and path point to the location for Software Artistry products. 2. At the command prompt, type idesign. 3. Press ENTER. Result: The Interface Designer appears.

16

SA-Application Software Expert 5.0

OK and Apply Quitting the Interface Designer

To quit the Interface Designer: 1. From the File menu, choose Exit. Result: A prompt appears for you to confirm unsaved changes. 2. Choose OK to save your changes. Result: The Interface Designer closes.

OK and Apply Overview

In nearly every dialog box in the Interface Designer you can implement your changes with the OK or Apply buttons.

Either button implements your changes immediately. The difference is that the OK button implements your changes while closing the dialog box where you made the changes. The Apply button implements your changes while keeping open the dialog box where you made the changes.

When should apply be used?

Use Apply when you want to preview your changes without closing the dialog box. For example, if you want to try several different preference colors for your controls, using the Apply button saves you from having to choose preferences from the options menu after each color selection.

Interface Designer Guide

17

1

Introduction

Customizing the Interface Designer with Preferences Introduction

You can customize the Interface Designer’s environment using preferences. Preferences affect the function and appearance of the Interface Designer, as well as the appearance of controls on forms you create.

Setting general preferences

To set general preferences: 1. From the Options menu, choose Preferences. Result: The Preferences dialog box appears and displays the General tab.

2. To align controls to the nearest grid coordinate, select the Snap To Grid check box. Otherwise, continue with step 3. 3. To automatically display the Properties dialog box when you create a new form or control, select the Auto Property Sheets check box. Otherwise, continue with step 4. 4. To draw or create multiple controls simultaneously, select the Draw Multiple Controls check box. Otherwise, continue with step 5. 5. To initially display the control palette in its own window, select the Detached Control Palette check box. Otherwise, continue with step 6. 6. To display the Menus tab in the SA-ASE Interface Designer window, select the Show Menu Page check box. Otherwise, continue with step 7.

18

SA-Application Software Expert 5.0

Customizing the Interface Designer with Preferences

7. To display the Toolbars tab in the SA-ASE Interface Designer window, select the Show Toolbar Page check box. Otherwise, continue with step 8. 8. In the Editor box, type the name of the text editor you want to use to correct .df file parse errors. 9. In the Grid Spacing box, type your preferred point size for your form grid lines. 10. Choose Apply or OK.

Setting colors preferences

Colors preferences are used to set the background and foreground colors of forms as well as selected and active controls as you use the Interface Designer. (This does not affect the color of a form when your interface is integrated with an SA-Script application.) To set colors preferences: 1. From the Options menu, choose Preferences. Result: The Preferences dialog box appears. 2. Choose the Colors tab. Result: The Colors tab appears.

3. From the Canvas Background list box, select the background color of the form. 4. From the Canvas Foreground list box, select the grid point colors in the canvas foreground. 5. From the Selected Control list box, select the border color for a selected control.

Interface Designer Guide

19

1

Introduction

6. From the Active Control list box, select the border color for the active control. Note: The Selected Control and Active Control settings are used when you align and size controls. The selected controls align or are sized according to the position or size of the active control. This is explained in detail in the chapter “Designing Controls.” 7. Choose Apply or OK.

Saving preference selections

You must save your preference selections if you want them to remain in your next session of the Interface Designer. To save your preference selections: •From the Options menu, choose Save Preferences. Result: The Preferences are saved.

20

SA-Application Software Expert 5.0

Designing Forms 2

This chapter covers the following topics: •Overview •Opening Resource Files •Working with Forms

2

Designing Forms

Overview Introduction

This chapter introduces the basic information you need to use the Interface Designer. The chapter also describes the procedures you follow to create basic forms. The complexity of the forms you build depends on your environment and the applications you develop at your site. For more information about using controls, enhancing form designs, and creating notebooks, please consult the chapters that follow this one.

Opening Resource Files Opening a new resource file

Starting the Interface Designer automatically creates a new resource file. You can create another resource file by using the following procedure. (Only one resource file can be open at a time.) To open another resource file: •From the File menu, choose New. Result: A new resource file opens.

Note: Only one resource file can be open at a time.

Resource files can also be accessed from the command prompts of any operating system by typing: i-design myfile (where myfile is the name of the resource file) The .df extension is automatically added to the file name.

22

SA-Application Software Expert 5.0

Opening Resource Files Opening an existing resource file

To open an existing resource file: 1. Open the Interface Designer. 2. From the File menu, choose Open. Result: A file selection dialog box appears. 3. Select the resource file you want to open. Result: The resource file opens. The Forms tab is active and shows a list of the forms that belong to the resource file.

Interface Designer Guide

23

2

Designing Forms

Working with Forms Creating a new form

To create a form: 1. Open the Interface Designer. 2. On the Forms tab, choose New Form. Result: A new form appears. Note: Every form you create appears in the Form ID column with a default name in the format, NEW_FORM1. Notebook form names follow the format, NEW_NOTEBOOK1.

Opening an existing form

To open an existing form: 1. Open the Interface Designer. 2. From the File menu, choose Open. Result: A file selection dialog box appears. 3. Select the resource file and choose OK. Result: The resource file opens. The Forms tab is active, and shows a list of the forms that belong to the resource file. 4. Double-click the name of the form you want to use. Result: The form appears. Note: To open multiple forms at once, use the SHIFT key while selecting the forms and choose Update.

Closing a form

To close a form: 1. Right-click the form. Result: The pop-up menu appears. 2. From the Form menu, choose Close. Result: A prompt appears for you to save any changes to the form.

24

SA-Application Software Expert 5.0

Working with Forms

3. Save your changes or close without saving. Result: The form closes.

Deleting a form

You cannot delete a form that is used as a subform in a notebook. To delete a form: 1. On the Forms tab, select the form you want to delete in the Form ID column. 2. From the Edit menu, choose Cut. Result: The selected form is deleted from the Form ID column. If you decide that you don’t want the form deleted, you can choose Paste to return it to the Forms tab.

Testing a form

Testing forms is an easy way to preview the appearance of controls. Besides typing in text boxes or selecting items from a list you can also review the following: • Tab order • Control position and size • Default selections in controls • Selections in lists and combo boxes • Display masks for text boxes with patterns • Appearance of images and icons • Property settings for controls and forms • Hypertext links to controls Though you can test a form any time, it is more valuable to test forms that have controls, otherwise you will see an empty form. To test a form: 1. Open the Interface Designer. 2. From the File menu, choose Open. Result: A file selection dialog box appears.

Interface Designer Guide

25

2

Designing Forms

3. Select the resource file and choose OK. Result: The resource file opens. The Forms tab is active, and shows a list of the forms that belong to the resource file in the Form ID column. 4. From the Form ID column, double-click the name of the form you want to test. Result: The form appears. 5. Choose Test. Result: A test form appears. 6. To close the test form, click the close menu.

Form properties

For each form, you can set properties that determine how the form looks and behaves. Properties are set for each form, and do not have to be identical with other forms in the same file. The figure shows the Forms Properties dialog box, with the Base tab as the default.

From the Base tab you can set the following properties: •Form Name - a meaningful form name which appears on the Form ID column and is used by SA-Script to load the form •Position and Size - the coordinates that are used for geometry management in a form

26

SA-Application Software Expert 5.0

Working with Forms

Note: Position and size coordinates only apply to forms, not subforms. They do not apply to subforms in notebooks. •Description - a description of the form that you want to appear in the form list The figure shows the Help property tab:

From the Help tab, you can set properties for: •Help Text - path to a help file from another source or help information that you type in the Help text box (only one method can be used). Form help displays in the ASE Hypertext Viewer. For more information on adding help to your application, see the chapter, “Building Additional Features.”

Interface Designer Guide

27

2

Designing Forms

This figure shows the Form properties tab:

From the Form tab, you can set properties for: •Title - the text of the title that appears on the dialog box form title bar. If you choose to have a title, the Title check box should also be selected. •Icon file - an icon file for use with the form •Styles - the styles that affect the appearance and behavior of the form. The styles are: • Title - determines whether a title bar appears on the form • Resize - determines whether the form can be resized • Minimize Button - determines whether the form has a minimize button • MinMax Button - determines whether the form has both a minimize and maximize button • System Menu - determines whether the form has a system menu icon. If you select this, select the Title and MinMax buttons as well. • Toolbar - determines whether space is allocated for a tool bar on the window • Menu - determines whether space is allocated for a menu bar on the window. If a menu has the same file name as the form, the menu is automatically loaded when the form is loaded.

28

SA-Application Software Expert 5.0

Working with Forms

• Task List - indicates that space is allocated for a task list showing active files or documents • Start on Blank Field - determines whether the insertion point appears in the first empty text box as defined in the tab order, when the form opens •Position - determines the initial form location on the desktop •Synchronize Form Coords - allows you to set the initial form size and location across multiple platforms •Synchronize Control Coords - allows you to set the control locations in a form across multiple platforms The figure shows the Tab Order property tab:

From the Tab Order tab, you can set the sequence used to progress through form controls using the TAB key. Use the Move Up or Move Down buttons to set the tab order.

Interface Designer Guide

29

2

Designing Forms Setting form properties

Note: If you set your preferences to show property sheets automatically when a new form or notebook is created you can skip steps 3 and 4. To set form properties: 1. Open a resource file. 2. From the Form ID column on the Form tab, double-click the the form you want to use. Result: The selected form appears. 3. Double-click or right-click anywhere in the form, except the title bar. Result: A pop-up menu appears. 4. From the pop-up menu, choose Properties. Result: The Form Properties property sheet appears. 5. Set the form properties. 6. When you are satisfied with the properties you selected for your form, choose Apply or OK.

30

SA-Application Software Expert 5.0

Designing Controls 3 This chapter covers the following topics: •Overview •Overview to Control Properties •Common Control Properties •Specific Control Properties •Working with Controls

3

Designing Controls

Overview Introduction

The number of controls you can add to a form is limited only by the size of the form. You can resize a form to allow additional space for controls. Caution: If you resize a form during development, you need to save it with that same size. Otherwise, the form will not appear correctly to end users. The process of adding controls to a form is the same for any control that you add to the form.

32

SA-Application Software Expert 5.0

Overview to Control Properties

Overview to Control Properties Overview

Each control has a property sheet with the following tabs: •Base •Help •Control (where control is replaced with the actual name of the selected control) The Base tab and Help tab properties are covered in the following sections.

Common Control Properties Base tab properties

This section describes the Base tab properties that are common to all controls. The figure shows the Base tab on the Control Properties dialog box:

From the Base tab, you can set properties for: •Control ID - a meaningful control ID to make it easier for you to set the tab order

Interface Designer Guide

33

3

Designing Controls

•Attachments - attachments maintain the position of controls in a form when the form is resized. Attachments can either be fixed, where a control remains in a specific location on a form no matter what the size of the form, or percentage, where a control location moves in proportion to the size of the form. For more information on setting control attachments, see the appendix, “Geometry Management.” •Size - coordinates used to adjust the height and width of the control •Offsets - coordinates used with percentage attachments that set the amount of “buffer space” between the control and the form borders. For more information on setting offsets, see the appendix, “Geometry Management.” •Hidden - sets the control as hidden or visible. Select this check box if you want to define certain controls with permissions. For example, you might want to select this field if you want certain fields visible only to managers or supervisors. •Disable - sets the control as active or inactive •Synchronize Coords - sets a fixed location for the control across multiple platforms •Description - a definition of the function of the control

34

SA-Application Software Expert 5.0

Specific Control Properties Help tab properties

This sections describes the Help tab properties that are common to all controls. The figure shows the Help tab:

From the Help tab, you can set properties for: •Help Text - path to a help file from another source or help information that you type in the Help text box (only one method can be used). Control help displays in the ASE Hypertext Viewer. For more information on adding help to your application, see the chapter, “Building Additional Features.”

Specific Control Properties Overview

Each control has specific properties, in contrast to the properties common to all controls. This section describes the specific properties for each control.

Interface Designer Guide

35

3

Designing Controls Button properties

This section describes the specific properties for a button control. The figure shows the Button tab:

From the Button tab, you can set the following function and appearance properties for a button: •Button Text - the text that appears on the button •Image File - the path and file name that contains the image that appears on the button. Note: If you specify an image to appear on the button, the button text you specify becomes a tooltip. •Action - the action that the button should perform. The following are valid actions: • Accept - accepts any values typed in the form • Cancel - closes the dialog box with no changes implemented • Help - displays the help topic for the form • None - a button whose function is determined by the application. For example, you can associate any kind of function to this button since its purpose is open to you. •Display Image - select this box to specify an image file.

36

SA-Application Software Expert 5.0

Specific Control Properties

•Default Button - determines whether the button is the selected one when the form is opened

Check box properties

This section describes the specific properties for a check box control. The figure shows the Check Box tab:

From the Check Box tab, you can set the following label and appearance properties for a check box: •Checkbox Label - the text that appears next to the check box •Initial Value - determines whether the check box is initially selected or not. Choosing true selects the check box, while false leaves check box empty. •Style - determines whether the selected check box is circular or square. Square is the default if box is unchecked.

Interface Designer Guide

37

3

Designing Controls Clock properties

This section describes the specific properties for a clock control. The figure shows the Clock tab:

From the Clock tab, you can set the following clock type and display style properties for a clock: •Clock Type - determines whether the clock has conventional twelve-hour or military twenty-four hour display •Border - determines the appearance of the border around the clock. The following are valid borders: • Raised - determines whether the lines appear raised above the form • Lowered - determines whether the lines appear lowered below the form • Field Border - determines whether the lines appear static, not raised or lowered, bordering the clock • None - no lines bordering the clock

38

SA-Application Software Expert 5.0

Specific Control Properties Combo box properties

This section describes the specific properties for a combo box control. This is a Combo Box tab:

From the Combo Box tab, you can set the following sort, box type, and content properties for a combo box: •Sorting - determines the sort order of list items. The following are valid sort methods: • Ascending - lists items starting with “A” at the beginning • None - no sorting applied to the items •Type - determines the type of a selection a user can make. The following are valid types: •Default - where a user can select an item in the list box •Read-Only - where a user can view items in the list box but cannot select •Mandatory - determines whether the user must select a value from the combo box •IME - determines whether the Input Method Editor (IME) is used to reflect local language characters instead of English •Initial Contents - determines whether an initial value displayed in the combo box •Starting ID - if you selected a default item to appear in the combo box, you must enter the ID in this field •Input Length - the maximum number of characters users can type in the combo box

Interface Designer Guide

39

3

Designing Controls Entry field properties

This section describes the specific properties for an entry field control. This is the Entry Field tab:

From the Entry Field tab, you can set the following function and pattern type properties for an entry field:

Note: Users can only type one line of text in an entry field. Use the Multi-Line Edit control for more lines. •Initial Value - the default value. If you do not type a value, the entry field appears empty when the dialog box appears. •Pattern Type - the following are valid, predefined pattern types, except for the Custom option where you would design your own. For more information on patterns, see the chapter “Building Additional Features.” • None - no pattern type • Integer - whole numbers only • Real - real numbers only • Time - time format, such as mm/dd/yyyy • Date - date format, such as hh:mm:ss • Password - a password format pattern • Custom - a pattern that you design

40

SA-Application Software Expert 5.0

Specific Control Properties

Note: The Pattern and Maximum Length fields are active depending on the Pattern Type you select. •Pattern - (only available for custom patterns) The pattern name. •Maximum Length - The maximum amount of characters users can type. •Read Only - determines whether the entry field is read only •Mandatory - determines whether users must type a value in the entry field •Caps Only - determines whether entries appear in all capital letters regardless of the case the user uses.

Group box properties

This section describes the specific properties for a group box control. This is the Group Box tab:

From the Group Box tab, you can set the following title and style properties for a group box: •Title - the name of the group box •Style - determines how the title should be aligned

Interface Designer Guide

41

3

Designing Controls Hypertext properties

This section describes the specific properties for a hypertext control. This is the Hypertext tab:

From the Hypertext tab, you can set the following style and starting text properties for a hypertext control: •Style - the formatting style in the hypertext box. The following are valid styles: • No WordWrap - user must use hard carriage returns to manually wrap text to the next line • No Format - automatic wordwrap • None - no line format •Starting Text - determines whether any initial text should appear in the hypertext control

42

SA-Application Software Expert 5.0

Specific Control Properties Image properties

This section describes the specific properties for an image control. This is the Image tab:

From the Image tab, you can set the following appearance properties for an image: •Filename - the path of the file containing the image •Border - determines the appearance of the border around the image. The following are valid borders: • Raised - determines whether the lines appear raised above the form • Lowered - determines whether the lines appear lowered below the form • Field Border - determines whether the lines appear static, not raised or lowered, bordering the image • None - no lines bordering the image •Style - determines the appearance of the image in the form. The following are valid styles: • Scroll Bars- so users can scroll to view the entire image • Clip - crops the image to fit in the border • Scale - scaled to a smaller size to fit in the border

Interface Designer Guide

43

3

Designing Controls List box properties

This section describes the specific properties for a list box control. This is the List box tab:

From the List Box tab, you can set the following sort and content properties for a list box: •Sorting - determines the sort order of list items. The following are valid sort methods: • Ascending - lists items starting with “A” at the beginning • None - no sorting applied to the items •Horizontal Scroll - determines whether a horizontal scroll bar appears •Mandatory - determines whether the user selects an item •Initial Contents - the default list items. You should rename these otherwise the default names appear in the list box. •Starting ID - this box is read-only and reflects the contents of the Initial Contents box

44

SA-Application Software Expert 5.0

Specific Control Properties Multi-line edit box properties

This section describes the specific properties for an MLE control. This is the MLE tab:

From the MLE tab, you can set the following function and appearance properties for an MLE: •Horizontal Scroll - determines whether a horizontal scroll bar appears on the MLE •Vertical Scroll - determines whether a vertical scroll bar appears on the MLE •Caps Only - determines whether entries appear in all capital letters regardless of the case the user uses •IME Local - determines whether the Input Method Editor (IME) is used to reflect local language characters instead of English •No WordWrap - determines whether the user must use hard carriage returns to manually wrap text to the next line •Read Only - determines whether the MLE should be read only •Mandatory - determines whether users must type in the MLE •Input Length - determines how many characters users can type in the MLE

Interface Designer Guide

45

3

Designing Controls Option button group properties

This section describes the specific properties for an option button group control. This is the Option Button tab:

From the Option Button tab, you can set the following label and appearance properties for an option button group: •Option Button Group Title - the title of the group box that surrounds the option buttons •Initial Selection - determines whether a button should be initially selected •Button Labels - the default option button labels.You should rename these otherwise the default names appear in the option button group. •Title Position - the alignment of the group box title •Style - determines whether the option buttons have a vertical or horizontal orientation

46

SA-Application Software Expert 5.0

Specific Control Properties Slider properties

This section describes the specific properties for a slider control. This is the Slider tab:

From the Slider tab, you can set the following scale and label properties for a slider: •Scale - the following are valid scale options: • Number of Ticks - the number of scale marks • Distance - the distance between each scale mark •Orientation - determines whether the slider has a vertical or horizontal orientation •Snap - determines whether the slide rule moves to the nearest scale mark •Labels - titles of scale marks. The order the labels appear here determines their order in your application.

Interface Designer Guide

47

3

Designing Controls Sub form properties

This section describes the specific properties for a subform control. You should use sub forms in the place of often used areas in forms. For example, if you have three buttons that appear as a group in several forms, instead of adding the three buttons to every form where they should appear, you can create one sub form control that contains the three buttons and refer to the subform control in each form. In other words, creating the buttons once for use in several forms. Sub forms can also be used for grouping sections of a form to aid in geometry management. For more information, see the appendix “Geometry Management.” This is the Sub Form tab:

From the Sub Form tab, you can set the following title, location, and style properties for a subform: •Title - the title of the sub form that appears in the border •Form - the location of the file containing the sub form •Border - determines the appearance of the border around the sub form. The following are valid borders: • Raised - determines whether the lines appear raised above the sub form • Lowered - determines whether the lines appear lowered below the sub form • Field Border - determines whether the lines appear static, not raised or lowered, bordering the sub form • None - no lines bordering the sub form

48

SA-Application Software Expert 5.0

Specific Control Properties Table properties

This section describes the three specific tabs for a table control: Table, Columns, and SQL. This is the Table tab:

From the Table tab, you can set the following sort, scrolling, and selection properties for a table: •Sorting - determines the sort order of table items. The following are valid sort methods: • Ascending - lists items starting with “A” at the beginning • None - no sorting applied to the items •Horizontal Scroll Bars - determines whether a horizontal scroll bar appears on the MLE •Multiple Selection - determines whether users can select more than one item at a time in the table

Interface Designer Guide

49

Danna: Sean Vyain says he’ll have the same sort options for everything. Obviously my screen shot will have to be updated when he changes it.

3

Designing Controls

From the Columns tab, you can set the following column heading and size properties for your table. This is the Columns tab:

From the Columns tab, you can set the following heading and column properties for a table: •Name- name of the column in the database •Heading - name of the column the user views on screen •Width - how many characters, horizontally the column should contain

50

SA-Application Software Expert 5.0

Specific Control Properties

From the SQL tab, you can set the following record limit and SQL statement properties for your table. This is the SQL tab:

From the SQL tab, you can set the following record limit and SQL statement properties for a table: •Record Limit - the maximum amount of records your table should contain •SQL Statement - any SQL statement, SA-Script or otherwise, can be typed in this box

Interface Designer Guide

51

3

Designing Controls Text box properties

This section describes the specific properties for a text box control. This is the Text tab:

From the Text Box tab, you can set the following label and alignment properties for a text box: •Label Text - the title of the text box •Horizontal Position - the horizontal alignment of the text inside the text box

Setting control properties

To set control properties: 1. Right-click the control you want to set properties for. Result: The pop-up menu displays. 2. Choose Properties. Result: The Control Properties sheet for the control appears.

Note: If you selected the Auto Property Sheets form preference, the Control properties sheet appears automatically when you create a new form or control.

3. Set the properties. 4. Choose Apply or OK.

52

SA-Application Software Expert 5.0

Working with Controls

Working with Controls

Adding controls

To add a control: 1. Open a resource file. 2. Double-click the form you want to add a control to. 3. Click a control button on the control palette. 4. Click on the form where you want the control to appear and size the control with your mouse pointer.

Note: You can apply exact sizing to controls using the Base property tab.

Result: The control appears on the form with attachments. After you have added all the controls, then you need to configure the attachments.

Setting attachments

When you add a control it has two default attachments. Both attachments are fixed as the default, meaning that the control is in a set position on the form and will not move, regardless of how the form is resized. You can change attachments so a control moves proportionally when the form is resized by setting them as percentage attachments. Attachments are set in the attachment editor, shown below the control palette. Fixed attachments are represented with solid lines, while percentage attachments are represented with dashed lines. For more information on attachments, see the appendix “Geometry Management.” To set attachments: 1. Add a control to a form. Result: The control appears on the form with two, fixed attachments. A likeness of the control also appears in the attachment editor. 2. To add a third attachment, click on a control side without any attachments.

Interface Designer Guide

53

3

Designing Controls

Result: A third, fixed attachment line appears. 3. To set a fixed attachment as a percentage attachment, click on a fixed attachment. Result: The solid, fixed attachment line changes to a dashed, percentage attachment line.

Note: You can add attachment lines to all four control sides by pressing SHIFT as you add the control to the form.

Moving controls

Note: Before moving a control make sure no controls are selected on the control palette. To move a control: 1. Click the control to move. 2. Drag the control to its new location.

Note: You can move multiple controls by pressing the SHIFT key and clicking each control to move and dragging them to their new location.

54

SA-Application Software Expert 5.0

Working with Controls Copying controls

To copy a control: 1. Click the control to copy. 2. Right-click the control. Result: The pop-up menu appears. 3. From the pop-up menu, choose Edit. 4. From the Edit menu, choose Copy. 5. From the Edit menu, choose Paste. Result: The new control appears as the selected control on top of the original control. 6. Move the selected control to the desired location and deselect the control.

Resizing controls

To resize a control: 1. Select the control you want to resize. 2. Either resize the control with the mouse pointer or doubleclick the control to open the Control Properties property sheet. Sizing is complete if you use the mouse pointer. 3. Under Attachments, change the measurements. 4. Choose Apply or OK. Result: The control is resized.

Resizing controls to the active control

Besides sizing controls manually, you can use the pop-up menu to size them to the active control. The active control is the “standard,” or the control that defines alignment for other selected controls. The active control is identified with a different color than the selected controls. To size a control: 1. Press the SHIFT key and click each control you want to size. Select the active control last. Result: Each selected control is highlighted. The active control appears in a different color. 2. Right-click the active control. Result: The pop-up menu appears.

Interface Designer Guide

55

3

Designing Controls

3. Point to Same Size and choose the appropriate sizing commands. Result: The controls change size according to your selection.

Aligning controls to the active control

To align controls: 1. Press the SHIFT key and click each control you want to align. Select the active control last. Result: Each selected control is highlighted. The active control appears in a different color. 2. Right-click the active control. Result: The pop-up menu appears. 3. Point to Align and choose the appropriate alignment commands. Result: The controls change alignment according to your selection.

Finding missing or obscured controls

As you add controls to a form you may find that the placement of some controls may obscure or completely hide other controls, especially when the form is resized smaller. You can find controls using the pop-up menu. To find controls: 1. Right-click anywhere in the form except the title bar. Result: The pop-up menu appears. 2. From the Edit menu, choose Find Controls. Result: The Select a Control box appears.

56

SA-Application Software Expert 5.0

Working with Controls

3. Select any of the following check boxes to find the control(s): • All - displays all the controls in the list so you can select which ones to move • Off form - displays only the controls in the list that do not appear in the current form size • Zero Size - displays only the control(s) in the list that are so small they cannot be seen on the form • Obscure - displays only the control(s) in the list that are obscured by another control 4. Choose Select to choose which controls to affect. 5. Choose one of the following: • Raise - to bring to the front any controls obscured or hidden by another control • Move - to move the hidden controls to the top-left corner of the form

Bringing a control to the front

As you add controls to a form you may find that the placement of some controls may obscure or completely hide other controls. You can bring smaller controls in the front of larger controls using the pop-up menu. To bring controls to the front:

Interface Designer Guide

57

3

Designing Controls

Sending a control back

Use the Send to Back menu command only with the group box control. The group box is a visual device that encloses a set of related options or controls. The group box must appear behind the controls, otherwise it would hide them. To send a group box control to the back: 1. Right-click the group box control. Result: The pop-up menu appears. 2. Choose Send To Back. Result: The group box appears behind the controls.

Note: You can also bring a partially hidden control to the front again by choosing “Bring to Front” from the pop-up menu.

Deleting controls

To delete a control: 1. Right-click the control to delete. Result: The pop-up menu appears. 2. From the Edit menu, choose Delete. Result: The control is deleted from the form.

58

SA-Application Software Expert 5.0

Designing Notebooks 4

This chapter covers the following topics: •Overview •Notebook Properties •Using Notebook Properties •Creating Notebook Tabs •Working with Notebook Tabs

4

Designing Notebooks

Overview Introduction

Notebook forms are a useful means of organizing related forms in an application. In a notebook, each tab has a corresponding form in a resource file. To create a notebook you must: 1. Create forms that will be the notebook tabs 2. Define the notebook and set its properties 3. Define the notebook tabs 4. Set the properties in the notebook tabs The sections that follow give you the basic information for adding a notebook and setting its properties, defining the notebook tabs, and testing the notebook. Note: Notebook properties override the properties of the forms they contain.

Adding a notebook

To add a notebook: 1. Open the Interface Designer. 2. Open a resource file that has forms associated with it. Result: The resource file opens. The Forms tab appears. 3. On the Forms tab, choose Add Notebook. Result: A new notebook appears.

60

SA-Application Software Expert 5.0

Notebook Properties

Notebook Properties Notebook properties summary

Notebooks are similar to forms in that they, too, have properties that you can set to determine how the notebooks look and behave. You use the Pages tab to define forms as tabs in the notebook. This figure shows the Pages tab of the Form Properties dialog box.

From the Pages tab, you can set properties for: •Tab Position - indicates the physical location of a tab on a notebook page Note: In Windows, tabs can only be located on the top. •Tab text - indicates the tab text of the tab •Form - indicates the name of the form contained within the .df file You can also arrange the tabs. See the section “Rearranging notebook tabs” on page 64 for instructions.

Interface Designer Guide

61

4

Designing Notebooks

Using Notebook Properties Setting notebook properties

Setting properties for a notebook is similar to setting properties for a form. You can set different properties for each notebook in a resource file.

Note: If you set your preferences to show property sheets automatically when a new form or notebook is created you can avoid steps 3 and 4. To set properties for a notebook: 1. Open a resource file. 2. Do one of the following: • If a notebook exists, double-click its file name in the Form ID column on the Forms tab. • If you need to add a notebook, from the Forms tab, click Add Notebook. 3. Position the mouse pointer anywhere in the notebook, except the title bar, and right-click. Result: A pop-up menu appears. 4. From the pop-up menu, choose Properties. Result: The Form Properties properties sheet appears.

62

SA-Application Software Expert 5.0

Creating Notebook Tabs

5. Set the properties for the notebook. 6. Choose OK.

Creating Notebook Tabs Adding tabs to a notebook

You create notebook tabs from the forms in a resource file. Like forms, you can set different properties selected for each tab in a notebook. To add a tab to a notebook: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Do one of the following: • If a notebook exists, double-click its file name in the Form ID column on the Forms tab. • If you need to add a notebook, from the Forms tab, click Add Notebook. 4. Position the mouse pointer anywhere in the notebook, except the title bar, and right-click. Result: A pop-up menu appears. 5. From the pop-up menu, choose Properties. Result: The Form Properties properties sheet appears. 6. Choose the Pages tab. Result: The Pages tab appears. 7. Under Form Name, select the name of the form that you want to include as a tab in the notebook. 8. In the Tab Text box, type the text that you want to see on the tab. 9. Under Tab Position, select the position where you want the tab to appear. 10. Choose Add. Result: The tab text appears in the Tab Text group box with the form description. 11. Choose Apply. Result: The notebook tab appears on the notebook form.

Interface Designer Guide

63

4

Designing Notebooks

12. Review the notebook pages. 13. Use the following table to decide your next action.

If... the tab properties are not complete, or you want to make further additions or changes. the tab properties are complete.

then... do so now.

choose OK. Result: The tab appears on the notebook.

Working with Notebook Tabs Rearranging notebook tabs

You can rearrange the tabs in the notebook form. To rearrange notebook tabs: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Do one of the following: • If a notebook exists, double-click its file name in the Form ID column on the Forms tab. • If you need to add a notebook, from the Forms tab, click Add Notebook. 4. Position the mouse pointer anywhere in the notebook, except the title bar, and right-click. Result: A pop-up menu appears. 5. From the pop-up menu, choose Properties. Result: The Form Properties properties sheet appears. 6. Choose the Pages tab. Result: The Pages tab appears. 7. Under Notebooks, select the tab you want to rearrange.

64

SA-Application Software Expert 5.0

Working with Notebook Tabs

8. Choose Move Up or Move Down. Result: The notebook page moves to the position you chose. 9. Choose Apply. 10. Review the appearance of the notebook form and the page positions. 11. Use the following table to decide your next action.

If... the tab properties are not complete, or you want to make further additions or changes.

then... do so now.

the tab properties are complete.

choose OK. Result: The tab appears on the notebook.

Editing notebook tabs

Editing notebook tabs involves editing the page properties, not the form associated with the tab. To edit a notebook tab: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Do one of the following: • If a notebook exists, double-click its file name in the Form ID column on the Forms tab. • If you need to add a notebook, from the Forms tab, click Add Notebook. 4. Position the mouse pointer anywhere in the notebook, except the title bar, and right-click. Result: A pop-up menu appears. 5. From the pop-up menu, choose Properties. Result: The Form Properties properties sheet appears. 6. Choose the Pages tab.

Interface Designer Guide

65

4

Designing Notebooks

Result: The Pages tab appears. 7. Make changes to any of the properties on the Pages tab that need to be altered. 8. Choose Apply. Result: The changes are applied to the notebook. 9. Choose Apply or OK. Result: All applied properties take effect on the notebook tabs.

Removing notebook tabs

You can delete every notebook tab without deleting the notebook, but every notebook must have at least one tab; otherwise an error message appears. To remove notebook pages: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Do one of the following: • If a notebook exists, double-click its file name in the Form ID column on the Forms tab. • If you need to add a notebook, from the Forms tab, click Add Notebook. 4. Position the mouse pointer anywhere in the notebook, except the title bar, and right-click. Result: A pop-up menu appears. 5. From the pop-up menu, choose Properties. Result: The Form Properties properties sheet appears. 6. Choose the Pages tab. Result: The Pages tab appears. 7. Under Notebooks, select the page you want to delete from the list. 8. Choose Delete. Result: The notebook page is deleted from the list. 9. Choose Apply or OK. Result: The selected notebook tabs are deleted from the notebook.

66

SA-Application Software Expert 5.0

Working with Notebook Tabs

Deleting notebooks

To delete a notebook: 1. Open the Interface Designer. 2. Open the resource file that contains the notebook that you want to delete. Result: The resource file opens with a list of forms and notebooks in the Form ID column on the Forms tab. 3. Select the notebook you want to delete. 4. Choose Delete. Result: The notebook is deleted and removed from the list of forms.

Interface Designer Guide

67

4

Designing Notebooks

68

SA-Application Software Expert 5.0

Building Additional 5 Features

This chapter covers the following topics: •Overview •Pattern Components •Formatting Text Boxes with Patterns •Creating Menus •Creating and Working with Toolbars •Creating Hypertext Controls •Creating Online Help

5

Building Additional Features

Overview Introduction

Adding enhancements, such as menus, toolbars, patterns, and online help can make your application more useful. You must first set menu and toolbar styles before you can add these enhancements. Then, rename the menu and toolbar with the same name as the form and they will automatically “attach” to the form.

Pattern Components What are patterns?

Patterns are templates for text boxes and are used to provide visual cues to users regarding the format of typed information. Patterns are specified as part of the control description in a resource file.

Pattern types

There are six possible pattern types: • Date and Time - provides locale-aware entry masks for typing dates and times • Integer - provides entry masks for typing integers • Real - provides entry masks for real values • Password - replaces all typed characters with * • User-defined - allows custom descriptions for typing text in text boxes

70

SA-Application Software Expert 5.0

Pattern Components Entry and display masks

Every pattern consists of an entry and display mask. Entry masks consist of blank and non-blank characters and do not appear to users, but restrict what can be typed. For example, you may want to restrict users to only typing numbers in a social security field, and only alphabetic characters for a name field. Both entry masks are defined using character flags. Display masks are visual cues to users for what should be typed in a text box. For example, a display mask for a social security number looks like this: nnn-nn-nnn and a display mask for a phone number looks like this: nnn-nnn-nnnn unlike entry masks, display masks appear to users.

Character flags

Entry masks are composed of character flags and define what a user can type in a pattern. Character flags can be one of the following: • Alpha = restricts entries in a text box to alphabetic characters only • Numeric = restricts entries in a text box to numeric characters only • Any = entries can be alpha-numeric and include symbols as well

Valid characters

Character flags can be customized using valid characters. For example, if you create a control where a driver’s license number is entered, and the number begins with a capital letter, you could select the numeric character flag and customize it with the “A,” valid character. This allows the user to enter the one uppercase alpha letter in the first position, while the rest of the field remains numeric. The following are valid character types: • a = upper or lowercase alpha • l = lowercase alpha

Interface Designer Guide

71

5

Building Additional Features

• A = uppercase alpha • # = numeric • V = valid character list • 0 = alpha-numeric •

Fill flags

SPACE

= no characters allowed (read-only to users)

Fill flags consist of the following: • Reverse - makes a pattern fill from right to left • Fill all - makes a pattern invalid until a valid character is typed for every non-blank position in the entry mask

Formatting Text Boxes with Patterns Creating patterns

The predefined patterns in the Interface Designer cover most any type of control you will add to a form. However, use the following procedure if you prefer to create your own patterns. To create a pattern: 1. Open the Interface Designer. 2. Open a resource file that contains a form for which you want to define patterns. 3. Choose the Patterns tab.

72

SA-Application Software Expert 5.0

Formatting Text Boxes with Patterns

4. Choose Add. Result: The Pattern Artist dialog box appears.

5. Type information as appropriate for your application. • Pattern ID - the name of the new pattern • Description - the description of the pattern • Display Mask - the format that describes the pattern. Characters in this text box are seen by end users. For example, a date display mask might be mm/dd/yy. • Entry Mask - the format interpreted by the Interface Designer. For example, an entry mask for a date pattern can be mm/dd/yy. If there is a space in the Entry Mask text box, the character used in the Display Mask replaces the space. • Valid Characters - the type of characters that are typed, relative to the character flag selected. Valid characters are: • a - upper or lowercase alpha • l - lowercase alpha • A - uppercase alpha • # - numeric • V - valid character list • 0 - alpha-numeric •

SPACE

- no characters allowed (read-only to users)

Interface Designer Guide

73

5

Building Additional Features

• Fill Character - a character that is inserted in a text box when a control entry is incomplete. • Test Pattern - the test pattern • Characters - places a restriction on what type of data users can type in the pattern: • Alphabetic • Numeric • Any characters • Fill - specifies how fill characters can be inserted: • Reverse - inserts characters from right-to-left • Fill all - inserts characters in all non-blank spaces 6. Choose Apply or OK. Result: The Patterns tab appears with the updated information. 7. Associate the pattern with a text box on the form. For more information about specifying patterns with text box control, see the chapter, “Designing Controls.”

Applying patterns to text boxes

You can apply predefined and user-defined patterns to text boxes. To apply patterns to a text box: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Open the form that you want to use. 4. Double-click the text box to which you want to apply a pattern. Result: The control properties appear. 5. Choose the Text Box tab. Result: The Text Box tab appears. 6. From the Pattern Type list, select the pattern you want to use.

74

SA-Application Software Expert 5.0

Creating Menus

7. Choose Apply or OK. Result: The pattern is applied to the text box.

Disassociating patterns from text boxes

Patterns can be disassociated from any text box, including those in run time applications. If a pattern is disassociated from a text box, then any character can be typed in the text box. To disassociate a pattern from a text box: 1. Open the Interface Designer. 2. Open a resource file that contains the form. 3. Open the form that you want to use. 4. Double-click the control from which you want to disassociate the pattern. Result: The properties sheet appears. 5. Choose the Text Box tab. Result: The Text Box tab appears. 6. From the Pattern Type list, select None. Result: The pattern is removed from the text box.

Creating Menus Introduction

Menus are often used in forms to access commands without using a command prompt. This section discusses how to create menus for forms that become windows. The Interface Designer allows you to build menus with submenus. Note: You must first set menu and toolbar styles before you can add these enhancements. Then, rename the menu and toolbar with the same name as the form and they will automatically “attach” to the form.

Interface Designer Guide

75

5

Building Additional Features Creating window menus

You can create a menu when you create a new form for a window, or when you work with an existing form. In this instance, instructions are for an existing form. Note: It is not required to associate menus with forms. To create a menu: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Choose the Menu tab. Result: The Menu tab appears. 4. Choose Add. Result: The Menu Designer dialog box appears.

5. Click the menu name. Result: The name associated with the menu appears in the Menu Name box. 6. Choose the Menu Name browse button. Result: The Unique ID dialog box appears.

76

SA-Application Software Expert 5.0

Creating Menus

7. In the text box, type a unique menu name and choose OK. Result: The Unique ID dialog box closes and the menu name you entered appears in the Menu Name text box on the Menu Designer dialog box. The menu name is for development purposes only and does not appear to your users 8. In the Menu Text box, type the text that you want to appear on the menu. 9. Under the Style group box, select a style:

• Separator - allows a separator between menu commands • Disabled - determines whether a menu selection is available or not • Checkable - allows a menu command to switch on or off when a user chooses it • Checked - determines the default state of a checkable menu command Note: If you select Separator, a blank separator line appears on the menu. This causes any text previously associated with the menu command to disappear. 10. Choose Update. Result: The menu reflects the changes.

Interface Designer Guide

77

5

Building Additional Features

11. Choose OK. Result: The Menu Designer dialog box closes and the Menus tab appears. Note: You can add another menu at the same menu level by clicking Add After.

Adding submenus

Submenus appear under menus. You can create submenus to a menu as well as nest another submenu of a submenu. The following graphic shows submenus of the Format menu:

The following graphic shows a submenu of the Size submenu:

To add a submenu: 1. Open the Interface Designer. 2. Open a resource file that contains at least one form. 3. Choose the Menu tab. Result: The Menu tab appears. 4. Choose the menu you want to add a submenu to and click Update. Result: The Menu Designer dialog box appears.

78

SA-Application Software Expert 5.0

Creating Menus

5. Click the menu in the menu list to which you want to add a submenu. 6. Choose Add Under. Result: A new sub-menu with the default name NEW_ITEM1 appears under the selected menu.

7. Click the new submenu name. Result: The Menu Name and Menu Text boxes populate with default information. 8. Specify a unique name, menu text, and help (if needed). 9. Choose Update. Result: The default submenu is replaced by the new menu text, as well as the other information you specified. 10. Choose OK. Result: The Menu Designer closes and the Menus tab appears. You can add a submenu to a submenu by repeating this procedure. To do this, select the submenu instead of a menu before clicking Add Under. Note: You can add another submenu at the same submenu level by clicking Add After.

Testing menus

To test a menu: 1. Select a menu in the tree structure. 2. Choose Test. Result: A pop-up menu appears with the menu structure and text you created.

Interface Designer Guide

79

5

Building Additional Features

3. Click anywhere to close the pop-up menu. Result: The pop-up menu closes. 4. Choose OK. Result: The Menu Designer closes and the Menus tab appears.

To delete a menu:

Deleting menus

1. Click a menu or submenu in the tree structure. 2. Click Delete. Result: If you selected a menu or submenu that is a “parent” to other submenus, a prompt appears that asks you whether to update the modifications to the menu. Otherwise, the selected menu is deleted and removed from the list of menus. 3. Choose OK. Result: The Menu Designer closes and the Menus tab appears.

Creating and Working with Toolbars Introduction

Toolbars allow programs to behave in a manner that is more “user-friendly” than might be the case otherwise. The buttons on a toolbar act as visual mnemonics; that is, a button represents a menu command that the user does not have to remember. Buttons also makes frequently used commands more accessible. This section describes how to add a toolbar to a form that becomes a window.

Creating Toolbars

A toolbar can be added to a form at any time. To create a toolbar: 1. Open the Interface Designer.

80

SA-Application Software Expert 5.0

Creating and Working with Toolbars

2. Choose the Toolbars tab. Result: The Toolbars tab appears.

3. Click Add. Result: The Toolbar Properties dialog box appears. A default toolbar name, NEW_TOOLBAR1, appears in the Toolbar Name text box. Note: If you selected the Auto Property Sheets form preference, the Toolbar Properties properties sheet appears automatically when you create a new toolbar.

Interface Designer Guide

81

5

Building Additional Features

4. Choose the Toolbar Name browse button. Result: The Unique ID dialog box appears.

5. In the text box, type a unique name to replace the default toolbar name and choose OK. Result: The Unique ID dialog box closes and the toolbar name you typed appears in the Toolbar Name text box in the Toolbar Properties dialog box.

82

SA-Application Software Expert 5.0

Creating and Working with Toolbars Creating toolbar buttons

To add a toolbar button: 1. Open the Interface Designer. 2. Choose the Toolbars tab. Result: The Toolbars tab appears. 3. Click the toolbar to which you want to add a button. 4. Click Update. Result: The Toolbar Properties dialog box appears. 5. In the Item ID text box, type a string ID to represent the button for development purposes. 6. Click the Icon File browse button. 7. Select the icon file you want to appear on the button. 8. To create tooltip text for the button, type text in the Help Text box. 9. Choose Add. Result: The button appears in the list represented by the item ID, icon file, and help text information you typed. 10. To add additional buttons to the toolbar, repeat steps 5-9 as needed. 11. If you want the buttons in a different order than that in which you added them, use the Move Up and Move Down buttons to rearrange the order. Note: The button at the top of the list appears at the top of the toolbar if the toolbar appears vertically, and the first button on the left side if the toolbar appears horizontally. 12. Choose Update. Result: The Item ID, Icon File, and Help Text fields clear and the toolbar is updated. 13. Choose OK. Result: The Toolbar Properties dialog box closes.

Interface Designer Guide

83

5

Building Additional Features Creating separators between buttons

Separators enhance the appearance of a toolbar because they allow space between buttons, which makes the toolbar easier to use visually. To add a separator to a toolbar: 1. Open the Interface Designer. 2. Open a resource file containing the form you want to work with. 3. Choose the Toolbars tab. 4. Double-click the toolbar name you want to use. Result: The Toolbar Properties dialog box appears.

5. From the toolbar list, click the name of the toolbar form you want to use. 6. Choose Separator. Result: The separator appears at the bottom of the list of toolbars. 7. Choose Move Up or Move Down to move the Separator between the toolbar buttons. 8. To add additional separators, repeat steps 6-7. 9. If you want the buttons in a different order than that in which you added them, use the Move Up and Move Down buttons to rearrange the order. 10. Choose Update. Result: The Item ID, Icon File, and Help Text fields clear and the toolbar is updated.

84

SA-Application Software Expert 5.0

Creating Hypertext Controls

11. Choose OK. Result: The Toolbar Properties dialog box closes. Note: You can rearrange the position of buttons and separators at any time using the Move Up and Move Down buttons.

Creating Hypertext Controls Introduction

Hypertext controls provide online information to end users and can include text, sound, and images. They can also be linked to external programs. Hypertext controls do not replace online help, but are an alternative method of displaying information. Hypertext controls are visible as long as a form is open. Hypertext controls appear as a multi-line entry box with text. Text can be represented as colored text or as a button.

Types of hypertext buttons

Buttons appear in a different color from regular text at run time. When the button is clicked, the ASE Hypertext Viewer appears containing the linked item. The following are the types of buttons you can create: • Numerical • Alphabetic • Image • External file • Search string • External program • Marker tag

Interface Designer Guide

85

5

Building Additional Features Creating hypertext buttons

Buttons are created using hypertext string tags. To create a hypertext button: 1. Open the Interface Designer. 2. Open a resource file that contains the form you want to use. 3. Open the form that you want to use. 4. From the Control Palette, click the Hypertext button. 5. On the form, click your mouse pointer where you want the button to appear and drag the mouse pointer until the button outline is the size you want. Result: The button appears on the form. Note: If you selected the Auto Property Sheets form preference, the Control Properties properties sheet appears automatically when you create a new control. 6. Right-click the hypertext control . Result: The pop-up menu appears. 7. Choose Properties. Result: The Control Properties sheet for the control appears. 8. Set Base or Help tab properties as needed. 9. Choose the Hypertext tab. Result: The Hypertext tab appears.

86

SA-Application Software Expert 5.0

Creating Hypertext Controls

10. Select a style to apply to the hypertext button. • No WordWrap - user must use hard carriage returns to manually wrap text to the next line • No Format - automatic wordwrap • None - no line format 11. In the Starting Text box, type the appropriate hypertext tag. The hypertext tags are: Note: In each hypertag example, Button Name represents what the user will see.

Tag Purpose alphabetic used to pass an button alphabetic ID to an SAScript program external file

Syntax

Style Choices

[[Button Name|LABEL labeltext]]

N/A

used to create a link to an [[Button Name|FILE external file filename ATTRIBUTES]]

• No Wordwrap user must use hard carriage returns to manually wrap text to the next line • No Format automatic wordwrap • None - line format

external program

used to create links to [[Button Name|RUN external programs. The program name ARGUMENTS]] program’s executable file must have an .exe extension. Arguments you specify are passed as command prompt arguments to the program.

N/A

Interface Designer Guide

87

5

Building Additional Features

Tag image

Purpose used to create an image button

Syntax [[Button Name|IMAGE filename ATTRIBUTES]]

Style Choices • Scroll - the hypertext window contains scroll bars • Clip - the image is clipped as the default unless you specify a different attribute • Scale - the image is scaled to fit in the hypertext window

jump tag

marker tag numeric button

search string

searches the tag list for a marker that matches the text following the jump. If a match is found, the line containing the marker is positioned at the top of the viewer. Also, the hypertext view processes the EventJump to keep a list of markers used in a file. places an invisible marker in the text

[[text | Jump marker name]]

N/A

[[text | Marker marker name]]

N/A

used to pass a numeric button to an SA Script program

[[Button Name|ID id_number]]

N/A

where Button Name is the text displayed to the user used to find specified text [[Button N/A in a hypertext viewer Name|SEARCH search text]]

sound file used to create links to sound files

88

[[Button Name|PLAY filename]]

SA-Application Software Expert 5.0

N/A

Creating Online Help

12. When you finish setting properties, choose Apply or OK. Result: The hypertext button appears on the form.

Creating Online Help Introduction

You can create context-sensitive online help for controls and forms in two ways: • Adding help-text directly in the Interface Designer • Linking a help file to the control or form Help files linked to your form must reside in one of the following areas: • Working directory • Path • Saipath

Adding online help

To add online help: 1. Double-click the control or form to display its properties. Result: The Control Properties appear for the control or form. 2. Choose the Help tab. Result: The Help tab appears.

Interface Designer Guide

89

5

Building Additional Features

3. Do one of the following: • If you want to add help text directly from the Interface Designer, select the Help Text option button and type the help text in the box under the Help Text option button. • If you want to link a help file, select the Help File option button and type the path of the file in the text box. If you don not know where the file is located, use the Browse button to find the file and choose the file name. Result: The path and file name appear in the text box. 4. Choose Apply or OK. Result: The help is associated with the control or form. Note: You can only use SA-Script help text tags in your form.

90

SA-Application Software Expert 5.0

Using Forms in SA6 Script Programs This chapter covers the following topics: •Overview •Form Types •Parsing Forms

6

Using Forms in SA-Script Programs

Overview Introduction

Forms created with the Interface Designer are called from a SAScript program. The statements used to call forms are: • DlgCreate • DlgBox For more information on these statements, see the SA-ASE 5.0 SA-Script Language Reference.

Resource file location

Resource files can reside in any location. You can open a resource file from the application using only its file name if you specify the filename in one of the following areas: • path • saipath • working directory.

Form Types Introduction

A new form has its own user interface and program (its event handler). The form exists until the user accepts or cancels it or until another part of the application sends a close message, $MsgClose. There are two types of forms: •Modal •Modeless

92

SA-Application Software Expert 5.0

Parsing Forms Modal forms

A modal form is created with DlgBox. The statement following DlgBox is not executed until the user closes the form. The information specified by the user is returned in the fourth argument to DlgBox and is the output record variable. A modal form should be reserved for important error messages or critical forms where the user cannot continue without answering a query. For example, a message asking the user to confirm the deletion of a file.

Modeless forms

A modeless form is created with DlgCreate. Modeless forms do not require a user response. For more information on modal and modeless forms, see the SA-ASE 5.0 SA-Script Programming Guide.

Parsing Forms Introduction

When a resource file is saved, a binary (machine readable) version is created with a .dfc extension. It is the .dfc file that the SA-Script application actually uses. To parse forms from a command line: •For DOS/UNIX, enter: i-gen •For GUI interfaces, enter: i-genw For more detailed information on parsing forms, see the SAASE Script Programming Guide.

Common parsing errors

Parsing errors can occur when you open a resource file created with a prior version of the SA-ASE Dialog Box Painter or a file that has been edited with a text editor. Opening a previous version of a .df file produces a number of warnings from the Interface Designer that can safely be ignored. However, if a parsing error occurs, an error message appears identifying the error type. Note: Open the .df file in a text editor to correct parsing errors that prevent you from opening it.

Interface Designer Guide

93

6

Using Forms in SA-Script Programs

The following examples create parsing errors in the Interface Designer. These examples only appear outside of the use of the Interface Designer. In other words, the following examples could not be created using the Interface Designer . • Control, notebook, or form names having values other than numbers, letters, and underscores • Control, notebook, or form names having a number in the first position • Duplicate control, notebook, or form names in the same resource file • Control, notebook, or form names that use a reserved keyword

94

SA-Application Software Expert 5.0

Geometry Management

This appendix covers the following topics: •Overview •Dialog Coordinates •Examples

Overview Introduction

Geometry management is used in the Interface Designer and GUI library to automatically size and position controls in a form when the form is resized. You apply geometry management to a control by setting its attachments. For more information on attachments, see the chapter, “Designing Controls.” An attachment appears as a line from a control side to a form side. Every control has two attachment lines by default. You can add an attachment to each side of a control by pressing the SHIFT key when adding a control to a form.

How attachments work

An attachment is used to set the distance between the side of a control and the side of a form. For example, the left attachment for a control determines the distance from the left side of the control to the left side of the form. There are two types of attachments: •Fixed •Percentage Attachment types are discussed in more detail in the following sections.

Fixed attachments

96

A fixed attachment specifies a set distance between a control side and a form side and does not change when the form is resized. When you add a control to a form, a likeness of the control appears on the attachment editor, located below the control palette. A fixed attachment is represented as a solid line from the control side to the form side. The following figure shows a control with two fixed attachments.

SA-Application Software Expert 5.0

Dialog Coordinates

Percentage attachments

A percentage attachment specifies a proportionate distance between a control side and a form side that changes when the form is resized. When you add a control to a form, a likeness of the control appears on the attachment editor, located below the control palette. A percentage attachment is represented as a dashed line from the control side to the form side. The following figure shows a control with two percentage attachments.

Offsets

Offsets apply only to percentage attachments and are used to alter the position of controls after their percentage attachments have been calculated. Offsets can be positive or negative in adjusting the position of controls.

Dialog Coordinates Overview

Dialog coordinates determine the size and position of controls regardless of screen resolution. Dialog coordinates cause buttons, labels, and entry fields to automatically scale when displaying their contents. Also, you can use any font and your forms adjust proportionately.

Interface Designer Guide

97

Choosing fonts

When you choose fonts, remember that there are separate scale types for horizontal and vertical sizing. The horizontal scale is based on the width of a single character. The vertical scale is based on the height of the font. This means that a form appears much smaller with a 6-point font than a 12-point font. (Different fonts also have different width-to-height ratios.)

Examples Introduction

This section contains examples of different sets of attachments. Numbers next to attachment lines indicate the attachment size.

Note: If you want to see how attachments work, construct each example using the Interface Designer, and test the forms by resizing them. You can use any type of control to test geometry management.

98

SA-Application Software Expert 5.0

Examples Fixed attachment example

The following figure shows five controls with different sets of fixed attachments.

As this form is resized, controls 1-4 remain in their respective corners, because each control has a fixed attachment to the two nearest form sides. The controls do not change size because only two of the control sides are attached to the form. Control 5 functions differently because it has all four sides attached to the form. Each side of control 5 is set to a fixed distance from the form side, so the control changes size as the form is resized.

Interface Designer Guide

99

Percentage attachment example

The following figure shows five controls with percentage attachments .

Controls 1-4 do not change size, but their distance from the form sides changes proportionally to the size of the form. Control 5 changes size proportionally as the form is resized.

100

SA-Application Software Expert 5.0

Examples Two percentageattached controls

The following figure shows two controls with fixed and percentage attachments.

Controls 1 and 2 have an equal share of the available width of the form. However, the space between the two controls expands and contracts as the form is resized. The size of the space between the controls is only 2% of the width of the form. The small space between controls makes the form appear awkward. Using offsets with percentage attachments creates more space between controls.

Interface Designer Guide

101

Offsets example

The following figure shows two controls with fixed and percentage attachments using offsets.

The distance between the two controls remains constant when the form is resized. Offset values are added after percentage sizes for the attachments are computed. Note: Offsets should not be used with fixed attachments.

102

SA-Application Software Expert 5.0

Examples Percentage attachments with offsets

The following figure is a complex example of percentage attachments with offsets, where three controls share approximately one-third of the form width.

This form functions similarly to the previous example with two controls. Percentage attachments for controls with adjacent sides should add up to 100%. For example, control 1's right attachment is 67%, so control 2's left attachment is 33%. Similarly, control 2's right attachment is 33%, so control 3's left attachment must be 67%. Opposing percentage attachments equalling 100% often produce the best layout though the 100% sum is not required.

Interface Designer Guide

103

Fixed and percentage attachments with offsets

The following figure is an example of fixed and percentage attachments. Negative offsets are used for controls 2 and 3 to center them on the form. (It is assumed that the width of controls 2 and 3 is 40 dialog units.)

For more attachment examples, see the forms in the resource file of the Interface Designer.

104

SA-Application Software Expert 5.0

Index Symbols # valid character (character flags), 72 $MsgClose message, 92 .df files see also df files, resource files, 15

Numerics 0 valid character (character flags), 72 12-hour clock controls, 38 24-hour clock controls, 38

A A valid character (character flags), 72 a valid character (character flags), 71 accessing forms, 15 Action property button controls, 36 Active Control list box Preferences dialog box, Colors tab, 20 active controls borders color settings, 20 adding control attachments, 54, 96 controls, 53 forms to notebooks, 63 notebook tabs, 63, 64 notebooks, 60 online help for forms/controls, 89 separators to toolbars, 84 toolbar buttons, 83 aligning controls, 20 alignment controls, 56 with grid coordinates, 18 forms, 26 group box control titles, 41

option button group control titles, 46 text in text box controls, 52 All check box Select a Control dialog box, 57 alpha character flags (patterns), 71 alphabetic hypertext button, 87 Apply button, 17 applying menu styles, 77 patterns to text boxes, 74, 75 styles to hypertext buttons, 87 associating help files with controls, 35 attachments controls, 34, 96 adding, 54 fixed attachments, 96, 99, 104 percentage attachments, 97, 100, 101, 103, 104 setting, 53, 54 Auto Property Sheets check box Preferences dialog box, General tab, 18

B background forms color settings, 19 Base tab Control Properties property sheet, 33 Form Properties dialog box, 26 bold text, 10 Border property image controls, 43 subform controls, 48 borders, 48 active controls color settings, 20 clock controls, 38 image controls, 43 selected controls color settings, 19 Bring to Front command (pop-up menu), 58

Index

button controls properties Action, 36 Button Text, 36 Default Button, 37 Display Image, 36 Image Filet, 36 Button Labels property option button group controls, 46 Button tab Control Properties property sheet, 36 Button Text property button controls, 36 buttons Apply, 17 hypertext buttons creating, 86, 87, 89 styles applying, 87 OK, 17 toolbars creating, 83 icon files, 83 rearranging, 83, 85 separators creating, 84, 85

C calling forms from SA-Script statements, 92 Canvas Background list box Preferences dialog box, Colors tab, 19 Canvas Foreground list box Preferences dialog box, Colors tab, 19 Caps Only property entry field controls, 41 cautions, 11 character flags (text patterns), 71 customizing, 71 valid characters, 71 check box controls circular, 37 properties Checkbox Label, 37 Initial Value, 37 Style, 37 square, 37 Check Box tab Control Properties property sheet, 37 checkable menu commands, 77 Checkbox Label property check box controls, 37

106

SA-Application Software Expert 5.0

checked menu commands, 77 circular check box controls, 37 clock controls 12-hour, 38 24-hour, 38 borders, 38 properties, 38 Clock tab Control Properties property sheet, 38 Close command (Form menu), 24 closing forms, 24 color active control border settings, 20 form background settings, 19 form foreground settings, 19 selected control border settings, 19 Colors tab Preferences dialog box, 19 Column tab Control Properties property sheet, 50 columns (tables) naming, 50 headings, 50 width, 50 combo box controls properties IME, 39 Initial Contents, 39 Input Length, 39 Mandatory, 39 Sorting, 39 Starting ID, 39 Type, 39 read-only, 39 Combo Box tab Control Properties property sheet, 39 command prompts UNIX i-design, 16 commands Edit menu Copy, 55 Cut, 25 Delete, 58 Find Control, 56 Paste, 55 File menu Exit, 17 New, 22 Open, 23, 24 Form menu Close, 24 menus

checkable, 77 checked, 77 disabled, 77 separators, 77 Options menu Preferences, 18, 19 Save Preferences, 20 pop-up menu Bring to Front, 58 Properties, 62 Send to Back, 58 conrols descriptions, entering, 34 control palette displaying, 18 Control Properties properties sheet, 86 Control Properties property sheet Base tab, 33 Button tab, 36 Check Box tab, 37 Clock tab, 38 Column tab, 50 Combo Box tab, 39 Entry Field tab, 40 Group Box tab, 41 Help tab, 35 Hypertext tab, 42 Image tab, 43 List Box tab, 44 MLE tab, 45 Option Button tab, 46 Slider tab, 47 SQL tab, 51 Sub Form tab, 48 Table tab, 49 Text tab, 52 controls (forms), 15 active border color settings, 20 adding, 53 aligning, 20 to grid coordinates, 18 alignment, 56 attachments, 34, 96 adding, 54 fixed attachments, 96, 99, 104 percentage attachments, 97, 100, 101, 103, 104 setting, 53, 54 bringing to front, 57 button controls properties, 36 check box controls circular, 37

properties, 37 square, 37 clock controls properties, 38 combo box controls properties, 39 copying, 55 deleting, 58 dialog coordinates, 97, 98, 99, 100, 101, 102, 103, 104 disabling, 34 displaying, 34 entry field controls properties, 40 text limitations, 40 finding, 56 fonts selecting, 98 group box controls properties, 41 titling, 41 grouping as a single control, 48 help files associating, 35 creating, 89, 90 hiding, 34 hypertext controls creating, 85, 86, 87, 89 properties, 42 image controls borders, 43 cropping, 43 properties, 43 scaling, 43 scrolling, 43 list box controls properties, 44 MLE controls properties, 45 moving, 54 offsets, 34, 97, 102, 103, 104 option button group controls properties, 46 permissions, 34 previewing, 25 properties displaying, 18 ID, 33 setting, 52 resizing, 55 resizing to active control, 55, 56 selected border color settings, 19 sending to back, 58 sizing, 20, 34, 53, 55

SA-Script Language Reference

107

Index

sizing to active control, 55, 56 slider controls labeling, 47 orientation, 47 properties, 47 scaling, 47 space limitations, 32 subform controls borders, 48 properties, 48 titling, 48 synchronizing for cross-platform use, 34 tab sequence, setting, 29 table controls properties, 49 text box controls alignment of text in, 52 properties, 52 titling, 52 coordinate systems forms setting, 26 Copy command (Edit menu), 55 copying controls, 55 creating forms, 24 help files for controls, 89, 90 for forms, 89, 90 hypertext buttons, 86, 87, 89 hypertext controls, 85, 86, 87, 89 menus, 76, 77 notebook tabs, 63, 64 notebooks, 60 patterns, 72, 73, 74 resource files, 22 separators for toolbar buttons, 84, 85 submenus, 78 submenus under other submenus, 79 toolbar buttons, 83 toolbars, 80, 81 cropping image controls, 43 customizing pattern character flags, 71 Cut command (Edit menu), 25

D data sources bold text denotation, 10 date patterns, 70 Default Button property

108

SA-Application Software Expert 5.0

button controls, 37 defining forms as notebook tabs, 61 Delete command (Edit menu), 58 deleting controls, 58 forms, 25 menus, 80 notebook tabs, 66 notebooks, 67 Detached Control Palette check box Preferences dialog box, General tab, 18 df files see also resource files, 15 dialog boxes, 14 Apply button, 17 File Selection Forms tab, 23 Form Properties Base tab, 26 Form tab, 28 Help tab, 27 Tab Order tab, 29 Menu Designer, 76 OK button, 17 Pattern Artist, 73 Preferences, 18 Colors tab, 19 Select a Control, 57 Unique ID, 76, 82 dialog coordinates controls, 97, 98, 99, 100, 101, 102, 103, 104 disabled menu commands, 77 disabling controls, 34 disassociating patterns from text boxes, 75 Display Image property button controls, 36 display masks, 71 displaying control palette palettes control palette displaying, 18 control properties, 18 controls, 34 form properties, 18 Menus tab in Interface Designer main window, 18 Toolbars tab in Interface Designer main window, 19 DlgBox statement, 92 DlgCreate statement, 92 double-clicking, 10

E Edit menu commands Copy, 55 Cut, 25 Delete, 58 Find Control, 56 Paste, 55 editing notebook tabs, 65, 66 Editor box Preferences dialog box, General tab, 19 entry field controls properties Caps Only, 41 Initial Value, 40 Mandatory, 41 Maximum Length, 41 Pattern, 41 Pattern Type, 40 Read Only, 41 text limitations, 40 Entry Field tab Control Properties property sheet, 40 entry masks, 71 errors parsing errors common occurances, 94 troubleshooting, 93 Exit command (File menu), 17 external file hypertext button, 87 external program hypertext button, 87

F field borders clock controls, 38 image controls, 43 subform controls, 48 File menu commands Exit, 17 New, 22 Open, 23, 24 file names UNIX, 10 File Selection dialog box Forms tab, 23 Filename property image controls, 43 files resource files, 14 creating, 22 opening, 23 path requirements, 92

fill all fill flags (patterns), 72 fill flags (patterns), 72 Find Control command (Edit menu), 56 finding controls, 56 forms in notebooks, 61 fixed attachments, 96, 99, 104 controls, 34 setting, 54 fonts controls selecting, 98 foreground forms color settings, 19 Form menu commands Close, 24 Form Properties dialog box Base tab, 26 Form tab, 28 Help tab, 27 Tab Order tab, 29 Form Properties properties sheet, 62 Form property subform controls, 48 Form tab Form Properties dialog box, 28 forms, 14, 15 adding to notebooks, 63 alignment, 26 background color settings, 19 building process, 15 calling from SA-Script statements, 92 closing, 24 controls, 15 active border color settings, 20 adding, 53 aligning, 20 aligning to grid coordinates, 18 alignment, 56 attachments, 34, 96 adding, 54 setting, 53, 54 bringing to front, 57 button controls properties, 36 check box controls properties, 37 clock controls

SA-Script Language Reference

109

Index

properties, 38 combo box controls properties, 39 copying, 55 deleting, 58 descriptions, entering, 34 dialog coordinates, 97, 98, 99, 100, 101, 102, 103, 104 disabling, 34 displaying, 34 displaying properties, 18 entry field controls properties, 40 finding, 56 fonts, selecting, 98 group box controls properties, 41 grouping as a single control, 48 help files creating, 89, 90 help files, associating, 35 hiding, 34 hypertext controls properties, 42 image controls properties, 43 list box controls properties, 44 MLE controls properties, 45 moving, 54 offsets, 34, 97, 102, 103, 104 option button group controls properties, 46 permissions, 34 previewing, 25 properties ID, 33 setting, 52 synchronizing for cross-platform use, 29 resizing, 55 resizing to active control, 55, 56 selected border color settings, 19 sending to back, 58 sizing, 20, 34, 53, 55 sizing to active control, 55, 56 slider controls properties, 47 space limitations, 32 subform controls properties, 48 synchronizing for cross-platform use, 34 tab sequence, setting, 29 table controls

110

SA-Application Software Expert 5.0

properties, 49 text box controls properties, 52 coordinate systems setting, 26 creating, 24 default naming, 24 defining as notebook tabs, 61 deleting, 25 descriptions entering, 27 desktop position setting properties for, 29 finding in notebooks, 61 foreground color settings, 19 grid lines point size, setting, 19 help files creating, 89, 90 setting properties for, 27 icon files setting properties for, 28 modal, 93 modeless, 93 naming, 26 opening, 15, 24 opening multiple, 24 parsing, 93, 94 properties displaying, 18 overriding, 60 setting, 26, 27, 28, 30 synchronizing for cross-platform use, 29 resizing to accomodate controls, 32 see also resource files, 22 sizing, 26 styles, 28 testing, 25, 26 titling, 28 Forms tab File Selection dialog box, 23 Interface Designer New Form command, 24

G General tab Preferences dialog box, 18 grid lines forms point size, setting, 19 Grid Spacing box

Preferences dialog box General tab, 19 Preferences dialog box, General tab, 19 group box controls properties Style, 41 Title, 41 titling, 41 Group Box tab Control Properties property sheet, 41 grouping controls as a single control, 48

H headings table columns, 50 help files controls associating, 35 creating for controls, 89, 90 for forms, 89, 90 forms setting properties for, 27 path requirements, 89 Help tab Control Properties property sheet, 35, 90 Form Properties dialog box, 27 hiding controls, 34 Horizontal Position property text box controls, 52 Horizontal Scroll Bars property table controls, 49 Horizontal Scroll property list box controls, 44 MLE controls, 45 hypertext buttons alphabetic, 87 creating, 86, 87, 89 external file, 87 external program, 87 image, 88 jump tag, 88 marker tag, 88 numeric, 88 search string, 88 sound file, 88 styles applying, 87 hypertext controls creating, 85, 86, 87, 89 properties Starting Text, 42

Style, 42 Hypertext tab Control Properties property sheet, 42, 86

I icon files forms setting properties for, 28 toolbar buttons assigning, 83 icons, 11 ID property controls, 33 I-Designer see Interface Designer, 16 image controls borders, 43 cropping, 43 properties Border, 43 Filename, 43 Style, 43 scaling, 43 scrolling, 43 Image File property button controls, 36 image hypertext button, 88 Image tab Control Properties property sheet, 43 IME (Input Method Editor) property combo box controls, 39 IME Local property MLE controls, 45 Initial Contents property combo box controls, 39 list box controls, 44 Initial Selection property option button group controls, 46 Initial Value property check box controls, 37 entry field controls, 40 Input Length property combo box controls, 39 MLE controls, 45 integer patterns, 70 Interface Designer capabilities of, 8, 14 Forms tab New Form command, 24 Menus tab displaying in main window, 18 preferences saving, 20 setting, 18, 19

SA-Script Language Reference

111

Index

prerequisite knowledge for using, 8 quitting, 17 starting, 16 Toolbars tab displaying in main window, 19 italic text, 10

J jump tag hypertext button, 88

L l valid character (character flags), 71 Label Text property text box controls, 52 labeling option button group controls, 46 slider controls, 47 Labels property slider controls, 47 launching Interface Designer, 16 list box controls properties Horizontal Scroll, 44 Initial Contents, 44 Mandatory, 44 Sorting, 44 Starting ID, 44 List Box tab Control Properties property sheet, 44 listing forms associated with resource files, 23 lowered borders clock controls, 38 image controls, 43 subform controls, 48

M Mandatory property combo box controls, 39 entry field controls, 41 list box controls, 44 MLE controls, 45 marker tag hypertext button, 88 Maximum Length property entry field controls, 41 Menu Designer dialog box, 76 Menu style forms, 28

112

SA-Application Software Expert 5.0

menus, 10 commands checkable, 77 checked, 77 disabled, 77 separators, 77 creating, 76, 77 deleting, 80 naming, 77 styles applying, 77 submenus creating, 78 creating under other submenus, 79 naming, 79 testing, 79 text entering, 77 Menus tab displaying in Interface Designer main window, 18 Minimize Button style forms, 28 MinMax Button style forms, 28 MLE controls (multi-line edit box), 45 properties Horizontal Scroll, 45 IME Local, 45 Input Length, 45 Mandatory, 45 No WordWrap, 45 Read Only, 45 Vertical Scroll, 45 MLE tab Control Properties property sheet, 45 modal forms, 93 modeless forms, 93 monospace text, 11 moving controls, 54 Multiple Selection property table controls, 49

N naming forms, 26 menus, 77 submenus, 79 table columns, 50 toolbars, 82 New command (File menu), 22 New Form command (Interface Designer Forms tab), 24

No WordWrap property MLE controls, 45 Notebook property sheet, 61 notebooks (forms), 14 creating, 60 deleting, 67 properties, 61 setting, 62, 63 requirements for creating, 60 tabs creating, 63, 64 deleting, 66 editing, 65, 66 positioning, 61 rearranging, 64, 65 text, defining, 61 notes, 11 numeric character flags (patterns), 71 numeric hypertext button, 88

O Obscure check box Select a Control dialog box, 57 Off form check box Select a Control dialog box, 57 offsets controls, 34, 97, 102, 103, 104 OK button, 17 online help creating for forms/controls, 89 Open command (File menu), 23, 24 opening forms, 15, 24 multiple forms, 24 resource files, 23 option button group controls labeling, 46 orientation determining, 46 properties Button Labels, 46 Initial Selection, 46 Option Button Group Title, 46 Style, 46 Title Position, 46 titles alignment, 46 titling, 46 Option Button Group Title property option button group controls, 46 Option Button tab Control Properties property sheet, 46

Options menu commands Preferences, 18, 19 Save Preferences, 20 orientation option button group controls determining, 46 slider controls, 47 Orientation property slider controls, 47 overriding form properties, 60

P Pages tab Notebook property sheet, 61 parsing forms, 93, 94 parsing errors common occurances, 94 troubleshooting, 93 password patterns, 70 Paste command (Edit menu), 55 Pattern Artist dialog box, 73 Pattern property entry field controls, 41 Pattern Type property entry field controls, 40 patterns (text boxes), 70 applying, 74, 75 character flags, 71 customizing, 71 creating, 72, 73, 74 disassociating, 75 fill flags, 72 types, 70 percentage attachments, 97, 100, 101, 103, 104 controls, 34 setting, 54 permissions controls, 34 point size setting for form grid lines, 19 pop-up menu commands Bring to Front, 58 Properties, 62 Send to Back, 58 pop-up menus, 10 positioning notebook tabs, 61 preferences Interface Designer saving, 20

SA-Script Language Reference

113

Index

setting, 18, 19 Preferences command (Options menu), 18, 19 Preferences dialog box, 18 Colors tab, 19 previewing controls, 25 properties button controls Action, 36 Button Text, 36 Default Button, 37 Display Image, 36 Image File, 36 check box controls Checkbox Label, 37 Initial Value, 37 Style, 37 clock controls, 38 combo box controls IME, 39 Initial Contents, 39 Input Length, 39 Mandatory, 39 Sorting, 39 Starting ID, 39 Type, 39 controls displaying, 18 ID, 33 setting, 52 synchronizing for cross-platform use, 29 entry field controls Caps Only, 41 Initial Value, 40 Mandatory, 41 Maximum Length, 41 Pattern, 41 Pattern Type, 40 Read Only, 41 forms displaying, 18 overriding, 60 setting, 26, 27, 28, 30 synchronizing for cross-platform use, 29 group box controls Style, 41 Title, 41 hypertext controls Starting Text, 42 Style, 42 image controls Border, 43 Filename, 43 Style, 43 list box controls

114

SA-Application Software Expert 5.0

Horizontal Scroll, 44 Initial Contents, 44 Mandatory, 44 Sorting, 44 Starting ID, 44 MLE controls Horizontal Scroll, 45 IME Local, 45 Input Length, 45 Mandatory, 45 No WordWrap, 45 Read Only, 45 Vertical Scroll, 45 notebooks, 61 setting, 62, 63 option button group controls Button Labels, 46 Initial Selection, 46 Option Button Group Title, 46 Style, 46 Title Position, 46 slider controls Labels, 47 Orientation, 47 Scale, 47 Snap, 47 subform controls Border, 48 Form, 48 Title, 48 table controls Horizontal Scroll Bars, 49 Multiple Selection, 49 Sorting, 49 text box controls Horizontal Positiont, 52 Label Text, 52 Properties command (pop-up menu), 62 properties sheets Control Properties, 86 property sheets Control Properties Base tab, 33 Button tab, 36 Check Box tab, 37 Clock tab, 38 Column tab, 50 Combo Box tab, 39 Entry Field tab, 40 Group Box tab, 41 Help tab, 35 Hypertext tab, 42 Image tab, 43 List Box tab, 44 MLE tab, 45

Option Button tab, 46 Slider tab, 47 SQL tab, 51 Sub Form tab, 48 Table tab, 49 Text tab, 52 Form Properties, 62 Notebook property sheet, 61 Toolbar Properties, 81, 84

Q quitting Interface Designer, 17

R raised borders clock controls, 38 image controls, 43 subform controls, 48 Read Only property entry field controls, 41 MLE controls, 45 read-only combo box controls, 39 real patterns, 70 rearranging notebook tabs, 64, 65 toolbar buttons, 83, 85 records (tables) limit properties, setting, 51 SQL statements properties, 51 Resize style forms, 28 resizing controls, 55 controls to active control, 55, 56 forms to accomodate controls, 32 resource files, 14, 15 associated forms listing, 23 creating, 22 opening, 23 path requirements, 92 see also df files, 15 see also forms, 22 text editors selecting, 19 reverse fill flags (patterns), 72

S SA-Application Software Expert see ASE, 11 SA-ASE documentation set, 12 SA-Expert Administrator see Expert Administrator, 11 SA-Expert Advisor see Expert Advisor, 11 SA-Expert Evolution see Expert Evolution, 11 SA-Expert Foundation Manager see Expert Foundation Manager, 12 SA-Expert Mail Agent see Expert Mail Agent, 12 SA-Expert Quality see Expert Quality, 12 SA-Expert Support see Expert Support, 12 SA-Expert Web see Expert Web, 12 SA-EXPERTISE see EXPERTISE, 11 SA-ExpertView see ExpertView, 12 Save Preferences command (Options menu), 20 saving Interface Designer preferences, 20 Scale property slider controls, 47 scaling image controls, 43 slider controls, 47 scroll bars image controls, 43 list box controls, 44 MLE controls, 45 scrollbars tables, 49 scrolling image controls, 43 search string hypertext button, 88 Select a Control dialog box, 57 Selected Control list box Preferences dialog box, Colors tab, 19 selected controls borders color settings, 19 Send to Back command (pop-up menu), 58 separators menu commands, 77 toolbar buttons creating, 84, 85

SA-Script Language Reference

115

Index

setting control attachments, 53, 54 control properties, 52 coordinate systems for forms, 26 form properties, 26, 27, 28, 30 Interface Designer preferences, 18, 19 notebook properties, 62, 63 Show Menu Page check box Preferences dialog box, General tab, 19 Show Toolbar Page check box Preferences dialog box, General tab, 19 sizing controls, 20, 34, 53, 55 controls to active control, 55, 56 forms, 26 to accomodate controls, 32 slider controls labeling, 47 orientation, 47 properties Labels, 47 Orientation, 47 Scale, 47 Snap, 47 scaling, 47 Slider tab Control Properties property sheet, 47 Snap property slider controls, 47 Snap To Grid check box Preferences dialog box, General tab, 18 Software Artistry product names, 11 sorting, 49 Sorting property combo box controls, 39 list box controls, 44 table controls, 49 sound file hypertext button, 88 SPACE valid character (character flags), 72 SQL statements table records property settings, 51 SQL tab Control Properties property sheet, 51 square check box controls, 37 Start on Blank Field style forms, 29 starting Interface Designer, 16 Starting ID property combo box controls, 39 list box controls, 44 Starting Text property

116

SA-Application Software Expert 5.0

hypertext controls, 42 statements DlgBox, 92 DlgCreate, 92 Style property check box controls, 37 group box controls, 41 hypertext controls, 42 image controls, 43 option button group controls, 46 styles forms, 28 hypertext buttons applying, 87 menus applying, 77 Sub Form tab Control Properties property sheet, 48 subform controls, 48 borders, 48 properties Border, 48 Form, 48 Title, 48 titling, 48 submenus creating, 78 creating under other submenus, 79 naming, 79 synchronizing control properties for cross-platform use, 29 controls for cross-platform use, 34 form properties for cross-platform use, 29 System Menu style forms, 28

T Tab Order tab Form Properties dialog box, 29 tab sequence (controls) setting, 29 table controls properties Horizontal Scroll Bars, 49 Multiple Selection, 49 Sorting, 49 Table tab Control Properties property sheet, 49 tables, 49 columns headings, 50 naming, 50 width, 50

records limit properties, setting, 51 SQL statements properties, 51 scrollbars, 49 sorting, 49 tabs (notebooks) positioning, 61 creating, 63, 64 deleting, 66 editing, 65, 66 rearranging, 64, 65 text defining, 61 Task List style forms, 29 testing forms, 25, 26 menus, 79 text bold, 10 entry field control limitations, 40 italic, 10 menus entering, 77 monospace, 11 notebook tabs defining, 61 text box controls alignment of text in, 52 properties Horizontal Position, 52 Label Text, 52 titling, 52 text boxes patterns, 70 applying, 74, 75 character flags, 71 customizing, 71 creating, 72, 73, 74 disassociating, 75 fill flags, 72 types, 70 text editor selecting for resource files, 19 Text tab Control Properties property sheet, 52 time patterns, 70 Title Position property option button group controls, 46 Title property group box controls, 41 subform controls, 48 Title style

forms, 28 titles option button group controls alignment, 46 titling forms, 28 group box controls, 41 option button group controls, 46 subform controls, 48 text box controls, 52 Toolbar Properties properties sheet, 81 Toolbar Properties property sheet, 84 Toolbar style forms, 28 toolbars buttons creating, 83 icon files, 83 rearranging, 83, 85 separators creating, 84, 85 creating, 80, 81 naming, 82 Toolbars tab displaying in Interface Designer main window, 19 Preferences dialog box, 19 troubleshooting parsing errors, 93 Type property combo box controls, 39

U Unique ID dialog box, 76, 82 UNIX command prompts i-design, 16 file names, 10 user input bold text denotation, 11 user-defined patterns, 70

V V valid character (character flags), 72 valid characters character flags, 71 variables bold text denotation, 10 Vertical Scroll property MLE controls, 45

SA-Script Language Reference

117

Index

W width table columns, 50 windows see also forms, 15

Z Zero Size check box Select a Control dialog box, 57

118

SA-Application Software Expert 5.0