Tivoli Service Desk 6.0 Developer's Toolkit Interface Designer Guide
Back to Table of Contents
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.
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.
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 * .
- Custom allows custom descriptions for typing text in text boxes.
- None indicates no pattern type.
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 display masks
are defined using character flags.
Entry masks are visual cues to users for what should be typed in a text box,
though a user could enter anything. For example, an entry mask for a social security
number looks like this:
nnn-nn-nnn
and an entry mask for a phone number looks like this:
nnn-nnn-nnnn
Unlike display masks, entry masks appear to users.
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
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
- A = uppercase alpha
- # = numeric
- V = valid character list
- 0 = alpha-numeric
- space = no characters allowed (read-only to users)
Fill flags
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
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:
- Open the Interface Designer.
- Open a resource file that contains a form for which you want to define patterns.
- Choose the Patterns tab.
- Choose Add.
Result: The Pattern Artist dialog box appears.
- Use the following table to type information as appropriate for your application.
Field |
Description |
Pattern ID |
The name of the new pattern. |
Description |
The description of the pattern. |
Display Mask |
The format that controls what the user can enter. For example, if you
have a phone number mask with only numeric characters, users would not be able to enter
any other type of character but numeric. |
Entry Mask |
The entry mask appears in the field but has not control over what the
user can enter. For example, an entry mask for a phone number might appear as nnn-nnn-nnnn,
however this would not stop the user from typing alphabetic characters in the field if the
display mask was not configured for numeric only. |
Valid Characters |
The list of valid characters is shown here. |
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:
AlphabeticNumericAny 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.
|
- Choose Apply or OK.
- Associate the pattern with a text box on the form. For more information about specifying
patterns with text box control, see "Designing Controls."
You can apply predefined and user-defined patterns to text boxes.
To apply patterns to a text box:
- Open the Interface Designer.
- Open a resource file that contains at least one form.
- Open the form that you want to use.
- Double-click the text box to which you want to apply a pattern.
- Choose the Text Box tab.
- From the Pattern Type list, select the pattern you want to use.
- Choose Apply or OK.
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:
- Open the Interface Designer.
- Open a resource file that contains the form.
- Open the form that you want to use.
- Double-click the control from which you want to disassociate the pattern.
- Choose the Text Box tab.
- From the Pattern Type list, select None.
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.
Note: The Interface Designer allows you to build menus with submenus,
but you must first set menu and toolbar styles. Then, rename the menu and toolbar with the
same name as the form and they will automatically "attach" to the form.
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. If the Menu
tab does not appear in the TDT Interface Designer window, select Preferences from the
Options menu, then click the Show Menu Page check box and click the OK button to save your
changes.
To create a menu:
- Open the Interface Designer.
- Open a resource file that contains at least one form.
- Choose the Menu tab.
- Choose Add.
Result: The Menu Designer dialog box appears.
- Click the menu name.
Result: The name associated with the menu appears in the Menu Name box.
- Choose the Menu Name browse button.
- Type a unique menu name in the Unique ID dialog box 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.
- In the Menu Text box, type the text that you want to appear on the menu.
- Under the Style group box, select from the following styles:
- 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.
- Choose Update.
- Choose OK.
You can add another menu at the same menu level by clicking Add After.
Submenus appear under menus. You can create submenus to a menu as well as nest another
submenu to a submenu.
To add a submenu:
- Open a resource file that contains at least one form.
- Choose the Menu tab.
- Choose the menu you want to add a submenu to and click Update.
Result: The Menu Designer dialog box appears.
- Click the menu in the menu list to which you want to add a submenu.
- Choose Add Under.
Result: A new sub-menu with the default name NEW_ITEM1 appears under the
selected menu.
- Click the new submenu name.
Result: The Menu Name and Menu Text boxes populate with default
information.
- Specify a unique menu name, menu text, and help (if needed).
- Choose Update.
Result: The default submenu is replaced by the new menu text, as well as
the other information you specified.
- Choose OK.
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. (You can add another submenu at the
same submenu level by clicking Add After.)
To test a menu:
- Select a menu in the tree structure.
- Choose Test.
Result: A pop-up menu appears with the menu structure and text you
created.
- Click anywhere to close the pop-up menu.
- Choose OK.
To delete a menu:
- Click a menu or submenu in the tree structure.
- 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.
- Choose OK.
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.
Note: To create a toolbar, select Preferences from the Options menu, then
click the Show Toolbar Page check box and click the OK button to save your changes.
A toolbar can be added to a form at any time.
To create a toolbar:
- Open the Interface Designer.
- Choose the Toolbars tab.
- 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.
- Choose the Toolbar Name browse button.
- In the Unique ID dialog 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.
To add a toolbar button:
- Choose the Toolbars tab.
- Click the toolbar to which you want to add a button.
- Click Update.
- From the Toolbar Properties dialog box, type a string ID in the Item ID text box to
represent the button for development purposes.
- Click the Icon File browse button.
- Select the icon file you want to appear on the button.
- To create tooltip text for the button, type text in the Help Text box.
- Choose Add.
Result: The button appears in the list represented by the item ID, icon
file, and help text information you typed.
- To add additional buttons to the toolbar, repeat steps 5-9 as needed.
- 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.
- Choose Update.
- Choose OK.
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:
- Open a resource file containing the form you want to work with.
- Choose the Toolbars tab.
- Double-click the toolbar name you want to use.
- From the Toolbar Properties dialog box, click the name of the toolbar form you want to
use.
- Choose Separator.
Result: The separator appears at the bottom of the list of toolbars.
- Choose Move Up or Move Down to move the Separator between the toolbar buttons.
- Repeat steps 6-7 to add additional separators.
- 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.
- Choose Update.
- Choose OK.
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.
Buttons appear in a different color from regular text at run time. When the button is
clicked, the TSD Developer's Toolkit 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
Buttons are created using hypertext string tags.
To create a hypertext button:
- Open a resource file that contains the form you want to use.
- Open the form that you want to use.
- From the Control Palette, click the Hypertext button.
- 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.
Note: If you selected the Auto Property Sheets form preference, the
Control Properties properties sheet appears automatically when you create a new control.
- Right-click the hypertext control.
- Choose Properties.
- Set Base or Help tab properties as needed.
- Choose the Hypertext tab.
- Select a style to apply to the hypertext button.
- No WordWrap means the user must use hard carriage returns to manually
wrap text to the next line
- No Format causes automatic wordwrap
- None causes no line formatting
- Use the following table to type the appropriate hypertext tag in the Starting Text box.
Note: In each hypertag example, Button Name represents what the user will
see.
Tag |
Purpose |
Syntax |
Style Choices |
Alphabetic button |
Passes an alphabetic ID to a Developer's Toolkit program |
[[Button Name|LABEL labeltext]] |
N/A |
External file |
Creates a link to an external file |
[[Button Name|FILE filename ATTRIBUTES]] |
- No Wordwrap means the user must use hard carriage returns to manually
wrap text to the next line.
- No Format causes automatic wordwrap.
- None has no line formatting.
|
External program |
Creates links to external programs. The program's executable file must
have an .exe extension. Arguments you specify are passed as command prompt arguments to
the program. |
[[Button Name|RUN program name ARGUMENTS]] |
N/A |
Hypertext link |
Creates a hypertext link to a URL. The link launches the internet browser
specified in the WebBrowser environment variable. URL name can be http, ftp, and news. |
[[text | URL name]] |
Text appears as a blue block. |
Image |
Creates an image button |
[[Button Name|IMAGE filename ATTRIBUTES]] |
- Scroll creates scroll bars on the hypertext window.
- Clip crops the image to fit the border.
- Scale causes the image to fit entirely in the hypertext window.
|
Jump tag |
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. |
[[text | Jump marker name]] |
N/A |
Marker tag |
Places an invisible marker in the text |
[[text | Marker marker name]] |
N/A |
Numeric button |
Passes a numeric button to an TSD Script program |
[[Button Name|ID id_number]] where Button Name is the
text displayed to the user |
N/A |
Search string |
Finds specified text in a hypertext viewer |
[[Button Name|SEARCH search text]] |
N/A |
Sound file |
Creates links to sound files |
[[Button Name|PLAY filename]] |
N/A |
- When you finish setting properties, choose Apply or OK.
Note: Clicking the link displays the TSD Developer's Toolkit Viewer.
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
To add online help:
- Double-click the control or form to display its properties.
- Choose the Help tab.
- 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 do not know where the file is located, use the Browse
button to find the file and choose the file name.
- Choose Apply or OK.
Note: You can only use Developer's Toolkit help text tags in your form.
Tivoli Service Desk 6.0 Developer's Toolkit Interface Designer Guide
Back to Table of Contents
Copyright