Behind the Scenes

In the last example you created a complete, fully functional application simply by dragging and dropping columns from your database. But what happened behind the scenes?

Automatically, DX created an Object Instance Hierarchy of your application, and set resources for all the widgets in your interface.

When you dragged and dropped fields from the Schema Browser to the Browser, DX:

  • Created a Database Access widget (which connects your application to a database)
  • Created a Query widget (which allows the application's user to query the database)
  • Created the Data Presentation widgets in your interface
  • Created a Control Panel and populated it with often-used Control Widgets
  • Set all widget resources.
     

The Interface's Object Hierarchy

By editing widget resources, you can change the behavior of your application. By rearranging the object hierarchy, you can add, delete and subclass the widgets that make up your application.

Editing Widget Resources

You can edit any resource by selecting a widget, displaying its resources in the Resource Editor, and changing any resource value.

You can select a widget by:

  • Clicking on it in the Browser;
  • Clicking on it in your interface;
  • Searching for it using the Browser search field.

The easiest way to select a widget is by clicking on its object instance name on the Browser hierarchy. Some widgets (such as the Query and the Database Access widgets) are not represented visually on the interface. As you create your interface, it is likely that the hierarchy will grow too large to be viewed in its entirety on the Browser. The Browser has a Panner/Porthole combination for easy scrolling in two dimensions. Using the slider, you can view the portion of the hierarchy you cannot see.

If the hierarchy is very large, you may prefer using the Browser search field from the Browser View menu.

Note: All DBPak resources are grouped together at the bottom of the resource list.

Displaying Widget Resources

After you select the widget, you must update the Resource Editor--when you update, that widget's resources and their current values are displayed in the Resource Editor.

Update the Resource Editor in one of the following ways:

  • Double-click on the widget.
  • Select the widget, then click the Update icon on the Resource Editor tool bar.
  • Select the widget, then select Update from the Resource Editor View menu.

Once you update a resource, you can then edit it. To the right of the resource you will see either the current setting or an empty input field. For some resources, toggle buttons (such as for True and False values), or an option menu will be displayed.


Adding Widgets to Your Application

DX gives you two way to add DX widgets to your applications, each with slightly different implications:

1. Dragging and Dropping Columns from the Schema Browser.

When you drag data columns from the Schema Browser, DX automatically sets database resources.

  • To create a new application window, drag one or more columns to the Browser Window. DX automatically creates a new window with a Container widget, Control Panel and Data Field for every widget you dragged and dropped.
  • To add widgets to an existing window, simply drag and drop them on to your application.

2. Dragging and Dropping Widgets from the Palette.

When you drag widgets from the Palette, DX doesn't know what database columns you want to use. You will have to set these manually by setting resources in the Resource Editor.

  • To create a new application window, drag a Container widget, such as the Bulletin Board, from the Palette to the Browser. DX creates a new screen in a separate window.
  • To add widgets to an existing application, simply drag them from the Palette to your application.

Usually you will mix and match these two methods of creating widgets. Thus you could create a new application window by dragging and dropping a Bulletin Board widget from the Palette. You could then add data fields by dragging and dropping columns from the Schema Browser to the application window.

Additional Resources:

  • Refer to Using Database Xcessory in DX HyperHelp.
  • If you are an SQL user, refer to How DBPak Resources Relate to SQL in DX HyperHelp for an overview of how DX sets SQL-based resources.

Documentation: