Creating And Editing Input Dialogs

---

Introduction

UG/Open API functions provide a programmatic interface to the UIStyler. The Delphi Automotive Format program (da_editdef.uf) has been written to allow you simply and easily create dialogs to be used as graphical user interfaces (GUI) for format blocks, without requiring you to create, compile, and link a C or C++ program!This documentation is a brief overview of the UIStyler and how it is used to fill/edit text informat blocks.For more information, see the Web-base Unigraphics documentation for the UIStyler.
UG/Open UIStyler lets is used to generate Unigraphics dialogs for input to text fields that are defined in blocks. The UIStyler is a development tool that:

 
Provides a visual builder that allows you to build dialogs and generate a UIStyler file (with a .dlg extension) that encapsulates the code associated with creating a dialog without requiring comprehensive knowledge of the underlying Graphical User Interface (GUI).
Insulates you from the specifics of GUI programming.
Allows you to rapidly create a dialog by selecting objects such as pushbuttons, toggle buttons, etc. from an object palette list.
Allows you to rapidly create a dialog by selecting objects such as pushbuttons, toggle buttons, etc. from an object palette list
Allows you to use your own user defined bitmaps.
Provides an attributes editor that allows you to set or modify the attributes of a particular object. For example, the state of a toggle button is an attribute. The attributes editor enables you to specify a valid state for the toggle button (ON or OFF). All of the attributes are listed when you select an object from a list window.
provides context sensitive help for objects located on the User Interface UIStyler dialog. The bottom of the dialog window has an area that displays context sensitive when you position the cursor over an icon.

A detachable toolbar (located on the main window) provides the users with the ability to quickly access and execute commands.

---

Accessing The UIStyler

You can access the UG/Open UIStyler directly from the Unigraphics Application Pulldown menu (Application—>User Interface Styler...). You are not required to have an open part.
Once you select the User Interface Styler option, the UG/Open User Interface Styler and Menubar display appears (See figure below) along with a default dialog with OK, Apply, and Cancel buttons.
---

Helpful Tips

Before you create a dialog, here are few helpful tips:
1)Only use primitive type string.Do not use integer or real primitives!
2)Only use the single list for options.

3)USE Relative paths for bitmap files.All bitmaps should be placed in the UGII_BITMAP_PATH directory!

4)The text field name in the format block must match the Object Identifier.

5)Use the single list option to display available options for a text field.

6) The option menu object can be used to present a scrolled list of options for a text field.  The list can containing zero or more list items in which only one can be selected at any given time.
7)To display options in single list box and use a different string or number of lines of text, you can use “hidden fields”.(See the “Hidden Fields” section below.)This can also be used with the toggle primitive and radio buttons.

---

Creating A Dialog For Format Blocks

1)Launch the UIStyler. (See above).
2)Create a new dialog file by clicking on File-> New Dialog.Don’t worry about same the blank dialog.
3)Create the GUI using the primitives and objects.

4)For single line input, insert a “string” primitive.

5)Enter the name of the text field in the “Object Identifier” textbox. Remember, the “Object Identifier” field in the UIStyler dialog MUST match the text “Field ID”

---

Hidden Fields 

To display options in single list box and use a different string or number of lines of text, you can use “hidden fields”.(See figure below)

The dialog above has an option for “Restricted and reportable chemicals standard” that lists three options:

1)GM1000M

2)GMW3059

3)<NONE>

But, the text displayed in the block for the field on the drawing format displays one of the following:

1)RESTRICTED AND

REPORTABLE CHEMICALS

PER GM1000M

2)RESTRICTED AND

REPORTABLE CHEMICALS

PER GM1000M

3)No text

How is this accomplished?

1)Create the options list to be displayed in the dialog using the “Single List” option.(See figure below.)

2)Enter the text’s ”Field ID” (defined in the format definition file.) for the name of the “Object Identifier”. 

3)Click on the “Items” button. (See figure below.)

4)Enter the options to be displayed in the dialog window on separate lines. (See figure below.)


5)Next, create a “Scrolled Window” that will be used for the “hidden text” to be used on the format instead of the option text. (See figure below.)

6)Change the name of the “Object Identifier” for the “Scrolled Window” to “HIDDEN_FIELDS”
7)Add a “Single List” widget under the “Scrolled Window” for each of the options. (See figure below.)

8)Change the name of each of the options represented by each of the “Single List” widgets to the name of the “Object Identifier” of the options “Single List” used to display the actual options text plus the number of the option (Example: RESTRICTED1, RESTRICTED2, etc.)

9)The “Hidden Fields” options will only be displayed in edit mode. (See figure below.)

---

Saving The Dialog File

After you are finished defining your dialog, you must save it in the application directory under the appropriate format’s sub-directory.Single the “Delphi Automotive Format” program is designed to read the dialog files, you are not required to modify the source code file or compile and link it.
---
[ Top | Introduction | Accessing UIStyler | Create | Tips | Hidden Fields | Saving | Main ]

Last updated on January 19, 2001
Send feedback: steven.l.alexander@delphiauto.com