Sample Application for Property Tabs


This sample demonstrates the use of Property Tabs (TabView) in an XML Container.

About XML Containers

An XML Containers is a screen control (field) that renders based on XML data supplied to the control at runtime. To use an XML Container, you simply paint a control on a screen and nominate function (FieldAction) to execute when an event occurs. Then you populate the container by sending xml data to the control at runtime.

Use the following steps to add an XML Container to a screen:

  1. Paint the XML Container on the screen. Select the Container Style (i.e. Multicol for listview, TabCtrl for TabView etc).
  2. Set the Field Action to a function to execute on an event in the container. For some XML Container types you can also specify a double-click action.
  3. Set the InputXML. This is the default xml subset (for example "mytabs") to use to render the container contents on screen display. To re-render the contents, use the SCREEN *RENDER command. The Output XML is not required as this is specified as "@EventSubset" in the Input XML.
  4. Set other characteristics for the control such as color, fonts etc. Normally you will want "Perform on Show" to be true.
  5. Using the Blob Editor, select "New from Template" and select the desired XML Container type (listview, treeview etc.). Alter the template to suit your requirements. Save the blob.
  6. In the Screen source function or the function that calls the screen, create an xml subset from the static blob (i.e. XML *OPEN "mytabs" *BLOB= "tabs").
  7. Optionally modify the subset to reflect runtime conditions.
  8. When the screen is displayed, the XML Container will render based on the information in the xml subset.

To change the conents of the XML Container after the initial display use the SCREEN *RENDER command.

SCREEN *RENDER "fieldnameref" *SUBSET= "subsetdataref"


IF L-User = "Advanced" THEN
SCREEN *RENDER "tabfield" *SUBSET= "alltabs"
SCREEN *RENDER "tabfield" *SUBSET= "basictabs"

Once rendered, the XML Container will notify the server of events by running the function nominated in "FieldAction". In your event function, read the contents of the subset nominated at "OutputXML" or as specified in your "EventSubset" in the creation xml.

To activate an event in an XML Container other than the user clicking on the control, use the SCREEN *REFRESH command. A *REFRESH will force event logic to be performed.

About the TabView XML Container

The TabView XML Container is used to display Windows property tabs with the following functionality:

Any number of tabs can be rendered. If the tabs do not fit on the screen a left/right scroll option will be displayed.

Each tab requires an Id, Label, and optional mnemonic.

One tab can be selected by default on the initial render or by re-rendering the tabs.

You can update an individual tab or redraw all the tabs

Example Application

Download the tabdemo application for examples on using the TabView XML Container.

XML Schema and Examples

XML Schema XSD for TabView and TabView Event

Sample XML for TabView Create

Sample XML for TabView Event