Using Multiple Pages (Tabs)

 

You can build property pages with lots of controls and organize them on different tabs. Tabs are inserted into the code with the PPGLayout.AddTab call (like group and row controls) but no closing call is needed.

 

All controls from one AddTab call to the next AddTab call (or the end of the property page) will appear on a single tab.

 

It is important to remember that the first AddTab call needs to precede all controls in the layout to avoid unpredictable results.

The label that appears on each tab control is specified as the (mandatory) argument of the PPGLayout.AddTab method.

Like group controls, tag controls can be enumerated by setting up a loop using the PPGLayout.Count property and testing each PPGLayout.Item to see if it’s a group (see Changing the Layout for more information).

The PPGLayout.Item property takes either the index or the name of the item, so you can test it using the PPGItem.Type property as in the following example:

function FindFirstTab_OnClicked() {
   // Loop forwards through the list of items to find the tab tag 
   // that starts the first tab 
   for (var i=0; i<PPG.PPGLayout.Count; i++) {

       // Test for "Tab" (name or type of either Tab tag)
       if (PPG.PPGLayout.Item(i).Type == "Tab") {

          // When we find it, print it out and quit
          LogMessage( PPG.PPGLayout.Item(i).Name );
          break;
       }
   }
}


Autodesk Softimage v7.5