Tivoli Service Desk 6.0 Developer's Toolkit Interface Designer Guide

Chapter 3: Designing Controls

Back to Table of Contents


Introduction

Overview

The number of controls you 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 does 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.

Overview to Control Properties

Overview

Each control has a property sheet with the following tabs:

The Base tab and Help tab properties are covered in the following sections.

Common Control Properties

Base tab properties

The following table describes the Base tab properties common to all controls.

Property Description
Control ID An ID that makes it easy for you to set the tab order. This is also how the control is referenced in a TSD Script program.
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 "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 "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 option if you want certain controls visible only to managers or supervisors.
Disabled 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

Help tab properties

From the Help tab, you can set properties for:

For more information on adding help to your application, see "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.

Button properties

The following table describes the specific properties for a button control.

Property Description
Button Label 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 is a button whose function is determined by you. For example, you can associate any kind of function to this button because its purpose is open to you.
Display Image Select Select this box to specify an image file.
Default Button Determines if the button is already selected when the form is opened.

Check box properties

The following table describes the specific properties for a check box control.

Property Description
Checkbox Label The text that appears next to the check box.
Initial Value Determines if the check box is initially selected or not. Choosing true selects the check box.
Style Determines if the selected check box is circular or square. Square is the default if the box is unchecked.

Clock properties

The following table describes the specific properties for a clock control.

Property Description
Clock Type Determines if 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 if the lines appear raised above the clock.
  • Lowered determines if the lines appear lowered below the clock.
  • Field Border determines if the lines appear static, not raised or lowered, bordering the clock.
  • None is where no lines border the clock.

Combo box properties

The following table describes the specific properties for a combo box control.

Property Description
Sorting Determines the sort order of list items. The following are valid sort methods:
  • Ascending lists items sorting ascending at the beginning.
  • None is where no sorting applied to the items.
Type Determines the selection type a user can make. The following are valid types:
  • Default means a user can select an item in the list box.
  • Read-Only means a user can view items in the list box but cannot select .
IME Determines if the Input Method Editor (IME) is used to reflect local language characters instead of English.
Initial Contents Determines if 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.
Maximum Length The maximum number of characters users can type in the combo box.

Text box properties

The following table describes the specific properties for an text box control.

Note: Users can only type one line of text in a text box. Use the Multi-Line Edit control for more lines.

Property Description
Initial Value The default value. If you do not type a value, the text box 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 "Building Additional Features"):
  • None indicates no pattern type.
  • Integer indicates whole numbers only.
  • Real is real numbers only.
  • Time is time format, such as mm/dd/yyyy.
  • Date is a date format, such as hh:mm:ss.
  • Password is a password format pattern.
  • Custom is a pattern you design. (The Pattern and Maximum Length fields are active depending on the Pattern Type you select.)
Pattern ID The pattern name. (Only available for custom patterns.)
Maximum Length The maximum amount of characters users can type
Read Only Determines if the entry field is read only
Caps Only Determines if entries appear in all capital letters regardless of the case the user uses
IME Local Determines if the Input Method Editor (IME) is used to reflect local language characters instead of English
GMT Greenwich Mean Time. The selection of this checkbox will automatically convert a date or time to GMT.

You must do the following to use this feature.

  1. Create two entry fields, one with a time pattern and the other a date pattern, on the same form.
  2. Name the entry fields in the following way: NAME_TIME for the time field, NAME_DATE for the date field.
    Note: The "NAME" must be the same for both.
  3. Select the "GMT Convert" check box on the property sheet for both fields.

Group box properties

The following table describes the specific properties for a group box control.

Property Description
Group Box Title The name of the group box
Style Determines how the title should be aligned

Hypertext properties

The following table describes the specific properties for a hypertext control.

Property Description
Style The formatting style in the hypertext box. The following are valid styles:
  • No Wordwrap means the user must use hard carriage returns to manually wrap text to the next line.
  • No Format means automatic wordwrap.
  • None means no line format.
Starting Text Determines if any initial text should appear in the hypertext control.

Image properties

The following table describes the specific properties for an image control.

Property Description
Image File The path of the file containing the image
Border Style Determines the appearance of the border around the image. The following are valid borders:
  • Raised determines if the lines appear raised above the image.
  • Lowered determines if the lines appear lowered below the image.
  • Field Border determines if the lines appear static, not raised or lowered, bordering the image.
  • None indicates no lines bordering the image.
Style Determines the appearance of the image in the form. The following are valid styles:
  • Scroll Bars is for the user to scroll the length of the image.
  • Clip crops the image to fit in the border.
  • Scale scales the image to fit in the border.

List box properties

The following table describes the specific properties for a list box control.

Property Description
Sorting Determines the sort order of list items. The following are valid sort methods:
  • Ascending lists items sorting ascending at the beginning.
  • None does not apply sorting to the items.
Horizontal Scroll Determines if a horizontal scroll bar appears.
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.
Multiselect Allows the user to select any number of multiple items in the list box in any order.

Multi-line edit box properties

The following table describes the specific properties for an MLE control.

Property Description
Horizontal Scroll Determines if a horizontal scroll bar appears on the MLE.
Vertical Scroll Determines if a vertical scroll bar appears on the MLE.
Caps Only Determines if entries appear in all capital letters regardless of the case the user uses.
IME Local Determines if the Input Method Editor (IME) is used to reflect local language characters instead of English.
No WordWrap Determines if the user must use hard carriage returns to manually wrap text to the next line.
Read Only Determines if the MLE should be read only.
Mandatory Determines if users must type in the MLE.
Maximum Length Determines how many characters users can type in the MLE.

Multi-select list box properties

The following table describes the specific properties for an MSLB control.

Property Description
Ascending Automatically sorts new data entered into a table in ascending order.
None Allows you to use the MSLB control without any property settings. The default property setting.
Horizontal Scroll Allows you to scroll horizontally to view data outside the viewable are of your screen.
Multiselect Allows you to randomly select multiple entries.
Initial Contents Allows you to select values displayed the first time the list box is opened.
Starting ID A variable that serves as the handle for an item. This variable is used to identify initial contents values.

Radio button Set properties

The following table describes the specific properties for a radio button set control.

Property Description
Radio Button Set Title The title of the group box that surrounds the radio buttons.
Initial Selection Determines (by number) if a button should be initially selected. You must enter a value to indicate which radio button will be selected (for example, 1 for the first button, 2 for the second button, etc.).
Button Labels The default radio button labels. You should rename these otherwise the default names appear in the radio button set.
Title Position The alignment of the group box title.
Style Determines if the radio buttons have a vertical or horizontal orientation.

Slider properties

The following table describes the specific properties for a slider control.

Property Description
Scale The following are valid scale options:
  • Number of Ticks is the number of scale marks or labels. In Windows, only tick marks appear. In UNIX, only labels appear. Note: In OS/2, both ticks and labels appear.
  • Distance is the number of units each mark represents. If the number of ticks is 10, and the distance is 1, the scale appears as 0, 1, 2, and so on until 10. However, if the number of ticks is 10, and the distance is 2, the scale appears as 0, 2, 4, and so on until 20.
Orientation Determines if the slider has a vertical or horizontal orientation. Horizontal has values appearing from left to right, while vertical has values appearing from bottom to top.
Snap Determines if the slide rule moves to the nearest scale mark.
Labels Titles of scale marks for UNIX only. The number of labels must the identical to the number of ticks.

Sub form properties

This section describes the specific properties for a subform control. You should use sub forms in place of frequently used controls 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, you create 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 "Geometry Management."

The following table describes the specific properties of the Sub Form tab.

Property Description
Subform Title The title of the sub form that appears in the border.
Form ID The location of the file containing the sub form.
Border Style Determines the appearance of the border around the sub form. The following are valid borders:
  • Raised determines if the lines appear raised above the sub form.
  • Lowered determines if the lines appear lowered below the sub form.
  • Field Border determines if the lines appear static, not raised or lowered, bordering the sub form.
  • None means no lines border the sub form.

Table properties

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

The following table describes the specific properties of the Table tab.

Property Description
Sorting Determines the sort order of table items. The following are valid sort methods:
  • Sort Ascending lists items sorting ascending from the beginning.
  • Sort Descending lists items starting in descending order.
  • None does not apply sorting to the items.
Horizontal Scroll Bars Determines if a horizontal scroll bar appears on the table
Multiple Selection Determines if users can select more than one item at a time in the table

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

The following table describes the specific properties of the Columns tab.

Property Description
Name Name of the column in the database
Heading Name of the column the user views on screen
Width How many dialog units, horizontally the column should contain.
Note: Up to 32 dialog units (4 horizontally and 8 vertically) can make up a character cell. A character cell is composed of a single character, alpha-numeric or symbol.
GMT Greenwich Mean Time. The selection of this checkbox will automatically convert a date or time to GMT.

You must do the following to use this feature.

  1. Create two entry fields, one with a time pattern and the other a date pattern, on the same form.
  2. Name the entry fields in the following way: NAME_TIME for the time field, NAME_DATE for the date field.
    Note: The "NAME" must be the same for both.
  3. Select the "Convert to/from GMT " check box on the property sheet for both fields.

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

The following table describes the specific properties of the SQL tab.

Property Description
Record Limit The maximum amount of records your table should contain.
SQL Statement Any SQL statement can be typed in this box.

Text properties

The following table describes the specific properties for a text control.

Property Description
Label Text The title of the text box.
Horizontal Position The horizontal alignment of the text inside the text box.

Tree controls

Tree controls let you create a hierarchy structure that can be expanded or collapsed. For more information about the various tree controls available in Tivoli Service Dest 6.0 Developer's Toolkit, see the lrtree.htm file.

Setting control properties

To set control properties:

  1. Right-click the control you want to set properties for.
  2. Choose Properties.
    Note: If you selected the Auto Property Sheets in the Preferences, the Control properties sheet appears automatically when you create a new form or control.
  3. Set the properties.
  4. Choose Apply or OK.

Tree Control Properties

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.
    Result: The control appears on the form with attachments. After you have added all the controls, then you need to configure the attachments.

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

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 "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.
  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.

Copying controls

To copy a control:

  1. Click the control to copy.
  2. Right-click the control.
  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. Size the control with the mouse pointer or double-click the control to open the control properties. (Sizing is complete if you use the mouse pointer.)
  3. Under Attachments, change the measurements.
  4. Choose Apply or OK.

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.
  3. From the pop-up menu, point to Same Size and choose the appropriate sizing commands.

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.
  3. From the pop-up menu, point to Align and choose the appropriate alignment commands.

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.
  2. From the pop-up menu, choose Edit and Find Controls.
    Result: The Select a Control box appears.
  3. Use one of the following check box options to find the control(s):
  4. Obscured displays only the control(s) in the list that are obscured by another control
  5. Choose Select to choose which controls to affect.
  6. Choose one of the following:

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:

  1. Right-click the group box control.
  2. From the pop-up menu, choose Bring to Front.

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.
  2. From the pop-up menu, choose Send To Back.

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. Select the control to delete.
  2. Press the Delete key.

Tivoli Service Desk 6.0 Developer's Toolkit Interface Designer Guide

Back to Table of Contents

Copyright