showPropertyPage

showPropertyPage(nam: String): Boolean;

The showPropertyPage method of the Window class is called by the Painter when the hasPropertyPage method indicates that the window has its own property-editing dialog for editing the property specified in the nam parameter. If the property name is an empty string, the global Properties dialog is requested. The showPropertyPage method returns whether property changes were made by the user in the dialog, so that the Painter knows whether to save the changed data.

The Painter calls the saveProperties method when the edited form is being saved, so that the window can save data edited in the dialog.

The method in the following example shows the use of the showPropertyPage method.

showPropertyPage(nam: String): Boolean updating;
vars
    form             : MyTableForm;
    result, maxIndex : Integer;
    loopIndex        : Integer;
begin
    if nam = 'layout' then
       sizeColumnArrays;
       create form transient;
       form.transientTable := self;
       result := form.showModal;
       if result = 0 then
          if persistTable <> null then
             beginTransaction;
             persistTable.columnHeadingArray.clear;
             persistTable.columnWidthArray.clear;
             persistTable.columnVisibleArray.clear;
             persistTable.columnPictureArray.clear;
             persistTable.columnLengthArray.clear;
             persistTable.columnAlignmentArray.clear;
             persistTable.columnInputTypeArray.clear;
             self.columnHeadingArray.copy(persistTable.columnHeadingArray);
             self.columnWidthArray.copy(persistTable.columnWidthArray);
             self.columnVisibleArray.copy(persistTable.columnVisibleArray);
             self.columnPictureArray.copy(persistTable.columnPictureArray);
             self.columnLengthArray.copy(persistTable.columnLengthArray);
             self.columnAlignmentArray.copy(
                                    persistTable.columnAlignmentArray);
             self.columnInputTypeArray.copy(
                                    persistTable.columnInputTypeArray);
             persistTable.columnHeight := self.columnHeight;
             myCollectionOid := null;
             commitTransaction;
          endif;
          layout := 'Defined';
          buildTableColumns;
          return true;
       else
          return false;
       endif;
    else
       return inheritMethod(nam);
    endif;
end;

Although this method is primarily used for ActiveX controls, you can also use it for subclassed (user-defined) controls. If you want your subclassed controls to have their own property-editing dialog, you must reimplement the showPropertyPage method so that it can be called by Painter.

The initiated dialog runs under the JADE application (app is the JADE application).