Kbase 15403: Changing the default naming for objects and files in the UIB
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Changing the default naming for objects and files in the UIB
Changing the Default Naming
In the UIB in V8
OBJECT NAMES
To change the default name and label for an object in the
UIB, you must add an entry to the progress.cst file or
create your own .cst file and add it to the custom objects
files by selecting Menu->Use Custom... on the widget
palette and adding the new custom file.
For example, to change the default naming and label for a
button, create a file called mycst.cst. The format to
change the name and label is:
*BUTTON &Default
NAME btn-1
LABEL My-Button
The 'NAME' will increment for every button you create in
the window (btn-2, btn-2, etc.). The 'LABEL' will not
increment.
DEFAULT FILE "SAVE AS" NAMES
To change the default "Save" name of a file, you need to
change the name of the window used in the template. If you
are creating a new window, the files default "save as" name
will be "C-Win". To change "C-Win" to "My-Win", you need
to open the window template and change its name from "C-
win" to "My-Win". A step by step description on how to do
this follows.
1. Open the window template file from the UIB
(dlc\src\template\window.w).
2. Click on the "List" button to open the list objects
dialog box.
3. Select the WINDOW object and click on the "Property"
button.
4. Change the objects name from "C-Win" to "My-Win" in
the Object fill-in field.
5. Click on "OK" in the property dialog box, then on "OK"
in the list objects dialog box, then save the template.
(Templates are stored in the dlc\src\template
and the dlc\src\adm\template subdirectories)
The next time you create a new window, you will still see
the name "Untitled:1" at the top of the window, but when
you click "Save", the default save name is now "MY-Name".
Built in objects, such as a SmartViewer, need to be
modified in order to reveal their underlying window.
1. Open the SmartViewer template file from the UIB
(dlc\src\adm\viewer.w).
2. Click on the procedure button.
3. Click on the advanced button in the Procedure Settings
dialog box.
4. Change the procedure type (at the top of the "Advanced
Procedure Settings" screen) from SmartViewer to Window.
The "Allow addition of:" section of the "Advanced
Procedure Settings" dialog box is no longer grayed out.
5. Click on the "Window" toggle box.
6. Click on the "OK" button. Click "OK" to any warnings.
7. Click "OK" in the "Procedure Settings" dialog box.
8. Click on the "List" button to open the list objects
dialog box.
9. Select the WINDOW object and click on the "Property"
button.
10.Change the objects name to "Smrt-V" in the "Object"
fill-in field.
11.Click on "OK" in the property dialog box, then on "OK"
in the list objects dialog box.
12.Click on the procedure button.
13.Click on the advanced button in the Procedure Settings
dialog box.
14.Change the procedure type (at the top of the "Advanced
Procedure Settings" screen) back from Window to
SmartViewer. The "Allow Addition of:" section is grayed
out again.
15.Click on "OK". Click on "OK" on the warning.
16.Click on "OK" in the "Procedure Settings" dialog box.
17.Save the template.
Now, if you create a new SmartViewer, when you go to save
the file, the default name is "Smrt-V.w".
REMEMBER to back up all template files before making
modifications!!!
Progress Software Technical Support Note # 15403