- Tabbed dialogs


This article discusses the workflow needed to create a simple tabbed dialog.

A sample schema is available for your learning: Example XFM Schema eastcity_dgnxfm-0001.xml 

 

Background - The Default dialog

Take the case of the following dialog that's created from nine properties.  While there is nothing wrong with it, and it's completely useable, it may be beneficial to save on screen real estate and organize the properties into tabs.

 

Before moving on, let's pick apart this dialog.  When inserting placement metadata without a form view, the resulting dialog appears as follows:

 

However, when Use Form View is enabled, the following dialog is generated.  Notice the "window" that contains the property fields, excessive width and the addition of scroll bars along the right side.  

 

These default values are found in the Place feature dialog > stdDlgItem.  By simply removing the default Width, Height,  Max Width and Max Height values, the resulting dialog will be sized to accommodate the property fields.

  

Lastly, notice that the form view is the container for the properties:

 

The remainder of this article discusses the steps needed to create a tabbed dialog.
 

Step 1 - Define a TabList operation property to display tab pages

Once you have the XFM properties defined and working as expected, you can organize them into tab groups or pages. To do that, navigate to the Operations node and add a TabList Property.  Define the number of tabs, the operation and the initial value which is the name of the active tab page.

 

 

Once the TabList has been created, you can add additional tab pages.  In this example, the tab pages are named General, and References

 

 

Step 2 - Define each tab page as a new dialog

In the Dialogs node, add two new dialogs - one for each tab page. 

Step 3 - Add the properties to the new tab pages "General" and "References"

The XFM properties are defined for the feature, so at this time they can be added as Feature Items to the tab pages "General" and "References". 

                               

Step 4 - Define width of each property field

Staying in the Dialog node, define the width of each property field. In this example, the default value of 10 has been changed to 15 and 12.
Note:  If you're not getting the expected results when placing the feature, ensure that  that the Resizeable option is enabled for all properties.

   

 

Step 5 - Modify the form view to include the operation TabList property

At this time, the Form View contains the nine feature properties, but not include the TabList which has been defined as an operation property.  Include the operation property named TabList that was created above.  To do that, choose Add > Operation Item.  

 

 

Step 6 - Remove the feature properties from the Form View

Since the nine properties are now positioned in the tab pages, they can be deleted from the Form View. 

 

 

Step 7 - Export and test

This is a good point to export and test the new tabbed dialog.  In all likelihood, the dimensions and sizes will cause the dialog to display poorly.

 

Step 8 - Adjust the sizes

Start with adjusting the height and width of the Form View TabList dialog item.  In this example, the width is set to 26 and the height to 7.  The values to use are often determined by trial and error.

 

Step 9 - Final export

Once exported the sizes have been adjusted, the dialog will be shown correctly with tabs and properties as defined above.

 

NOTE:  If you insert feature placement metadata, it will overwrite the operations and methods.  For this reason, always have a backup copy of your schema.  If needed, you can open in a text editor and copy/paste content from one schema to another.