pp108 : Autoextent

Autoextent

 

Autoextent is feature in Process Platform that allows you to automatically set the height of the controls in the User Interface. This functionality is supported for the following controls in an XForm.

  1. Group
  2. Table
  3. Choice-box
  4. Control-box

When you drag and drop the controls, the autoextent behavior will be automatically added to the controls except for the forms in free layout. The height of these controls will be automatically set to auto. Adding other controls to these autoextent-enabled controls(Grouping controls) increases the height of the layout and removing the controls will decrease its size. You can also specify a fixed height for these controls in the basic property sheet or re-size the controls and disable the autoextent behavior. Similarly, you can use "set default size" in the context menu to enable the autoextent behavior. For the layout element(layout div)the autoextent class will be added after the layout class in the class name.

Consider the behavior of autoextent functionality on a table control. The property "Minimum Number of Rows to Display" determines a default value for the height of the table. When autoextent behavior is enabled, the height of the table changes depending upon the value of this property. The number of rows that will be displayed during runtime is independent of the number of records and is always greater than or equal to the value in "Minimum Number of Rows to Display". If autoextent behavior is added to the table, the size of the table increases with insertion of rows; whereas a scroll bar will be displayed if you specify a fixed height in the table.

For all the controls that support autoextent functionality, the styles of the controls are defined in "xDefault.css". A prototype method "isAutoExtentEnabled" is available for each control in the designer library. The method returns a true boolean value if the control is autoextent enabled. To enable autoextent for the custom controls, you need to define the prototype method in the designer library and specify the return value as true. The framework retreives the correct behavior if a proper autoextent css class is available for that control.