Chapter 4 Editing Properties of Interface Objects

All objects dragged from the App Builder palettes have properties that can be edited. These properties include object name, color, and a variety of other characteristics, depending on the object type. Once you have dropped an object or have created an object in the interface, you will want to customize the object by editing it in the Revolving Property Editor. See Appendix B, Revolving Property Editor, for an illustration of a property editor and descriptions of each of the elements in all of the property editors.

Property Editor Procedures

The following procedures explain how to open and manipulate the Property Editor.

To Open a Property Editor

Double-click an object in the interface or in the Module Browser to open the Revolving Property Editor with the clicked-on object selected.

Or, select an object in the interface or in the Module Browser and choose Props (Revolving or Fixed) from the pop-up menu (displayed by pressing mouse button 3 in the interface or the Browser) to open the property editor with the object selected.

Or, choose Properties from the Editors menu in the App Builder primary window.

The Revolving Property Editor will be displayed, with the object most recently selected in the interface or the Module Browser selected in the Revolving Property Editor.

To Edit Properties of an Object

Once you have displayed the property editor, do the following to edit the properties of an object:

Choose the object type that you want to edit from the Object Type menu at the top of the Revolving Property Editor, if necessary.

If you double-clicked an object to display the Revolving Property Editor or if the object was selected when you chose Props from one of the pop-up menus, the object type and the specific object will already be selected.

If a tear-off (Fixed) editor is displayed, there is no Object Type menu.

Select the object that you want to edit in the Objects scrolling list, if necessary.

List item editing: once you have the appropriate number of items in the list, the easiest way to perform item editing in those property editors that have an item list* is to select the first item in the list, thus selecting it in the label text field. Type a new name for the item and click Return. The new name will be displayed in the item list and the next item in the list will be selected. Continue down the list with this select, type, Return sequence until all items are completed. *Property editors with item lists include the choice objects (Radio Box, Check Box, Option Menu), Combo Box, List, Menu, Menubar, and Spin Box.

Click the Apply button to apply the changes and leave the property editor displayed.

Click the OK button to apply the changes and close the property editor.

Click Reset to reset all changed elements to their values at the last Apply.

Click Cancel to reset all elements to their values at the last Apply and close the property editor.

To Display a Fixed Property Editor

The Revolving Property Editor is a single dialog box that displays one of 20 property editors, depending on the item you choose from the Object Type option menu. To display a separate, fixed property editor of a specific object type:

Select the object you want to edit in the interface or in the Module Browser. See "Module Browser" for a description of the Browser.

Choose Props from the pop-up menu (displayed by pressing mouse button 3 in the interface or in the Module Browser) and select Fixed from the Props submenu.

A fixed version of the property editor for the selected object type will be displayed.

Or

Choose the object type you want to edit in the Object Type menu of the Revolving Property Editor.

Click the Tear-off button at the top-right of the Revolving Property Editor.

A fixed version of the property editor for the selected object type will be displayed.

To Select Colors From the Color Chooser

Most property editors have background and foreground color properties. If you know the name of the color you want to use, type it in the text field next to Color:Background or Color:Foreground. To select a color from the Color Chooser palette:

The Color Chooser, with an array of color choices available, will be displayed.

Click the desired color in the palette.

The name of the selected color will be displayed after Color Name.

Click OK to select the color and dismiss the Color Chooser.

The selected color will be displayed in the rectangle next to the Background or Foreground menu and the name of the color will be displayed in the text field next to the colored rectangle.

Repeat the process for Background or Foreground, if desired.

Click Apply in the property editor to apply the changes.

The background or foreground of the object in the interface will display the selected color.

Example: Editing Main Window Properties

Use the procedure for editing a main window below as an example for editing other object types.

Your application might have multiple main windows, but only one primary main window, which is the starting point for the application. By default, the first main window created in the current project is designated as the primary main window. This designation can be changed in the Application Framework Editor, described in "To Establish Application Framework Behavior".

To Edit Properties of a Main Window

Once you have dropped a main window on the workspace do the following to edit its properties. See Appendix B, Revolving Property Editor for descriptions of each of the elements of the property editor.

Double-click the main window to display the Revolving Property Editor.

Or, Choose Properties from the Editors menu of the App Builder primary window, choose Main Window from the Object Type menu, and select the main window in the Objects list.

The main window will be selected in the Revolving Property Editor.

Change the Object Name, if necessary.

Change the Window Title to something appropriate.

This is the label that appears in the title bar of the main window.

Type the names of an Icon File, an Icon Mask File, and an Icon Label, if you want an icon to represent the window when it is minimized.

The Icon File and Icon Mask File must be xpm or xbm graphics files.

Change the User Resize Mode, if appropriate.

This determines if a user can resize the window in the compiled application.

Select Menubar, Toolbar, and Footer, as appropriate, to add these functional areas to the window.

If you select Menubar, you will want to create menus after you finish editing main window properties. See "Creating and Editing Menus" for instructions.

Note -

Selecting Menubar is the same as dragging a menu bar from the Controls palette and dropping it on a main window.

If you select Toolbar or Footer, you will want to edit the properties of the control panes that comprise these objects after you finish editing main window properties. You can drop controls on the control panes, make connections to programmatic actions, and do other things that can be done to any control pane.

Change the Size Policy and Size, as appropriate.

Note -

For all main windows and custom dialogs you will probably want to leave the Size Policy as Fixed while you are creating the application, and change it to Fit Contents as you finish the application, for internationalization and other purposes. When Size Policy is Fit Contents, the window will change size to accommodate changes in the size of objects as the text in the objects changes--or if the font size changes, for example.

Set Initial State to Iconic if you want the application to appear as an icon when it is started.

If you want the main window to be invisible when the application is started, deselect the visible setting for Initial State.

If the Visible check box is checked, click it to deselect it.

Set Background and Foreground colors, if appropriate.

Type in a color name if you know it or press mouse button 1 on the Background or Foreground menu button and choose Color Chooser to display the Color Chooser. Select a color and click OK. Background sets the color of the blank pane area of the window. Foreground does nothing that is visible in the completed interface.