Using MOP views for DataWindows

Assigning multiple views for a DataWindow object

The DataWindow painter includes a Multiple Orientation Painter view manager that lets you assign runtime layouts which change automatically when an application user changes the orientation of a handheld device or emulator. You can use the View>Runtime MOP Views>MOPViewManager menu item in the DataWindow painter to create multiple views for a DataWindow object with the same orientations available to PocketBuilder windows.

For more information on the available views, see “Multiple Orientation Painter for windows”.

When you open a window containing a DataWindow at runtime, PocketBuilder automatically selects the view of theDataWindow that correlates with the current orientation of the device or emulator. If you do not create a specific view for the selected orientation, the last view saved in the painter is displayed at runtime. In this case, the objects in the DataWindow do not necessarily display with optimal sizes and positions for the user-selected orientation.

Property specificity

For a DataWindow with multiple views, the position (x and y) and dimension (width and height) properties of the DataWindow and its column, text, and control objects are view-specific. However, the height properties of the DataWindow bands are not affected. All other properties are specific to the DataWindow—that is, they apply to all of its defined views.

The source code in the PKL file includes only the last position and dimension properties saved for the column, text, and control objects in the DataWindow. If you export the code for a DataWindow object with MOP views, the MOP views are not included in the exported code. The exported code contains only the most recent position and dimension properties from the original DataWindow. However, if you copy or move the DataWindow object, the copied or moved object contains all the original MOP views.