2017 June Release

Defining symbolsPermanent link for this heading

Syntax

symbol SymbolApprove {
  images<symbolimageformat, content> = {
    {
      SF_VALUE,
      file("filename")
    }
  }
}


The symbol keyword is used to define a symbol. It must be followed by the reference and a block referencing one or more symbol files of different formats and sizes, distinguished by the enumeration property COODESK@1.1:symbolimageformat.

It is suggested to import symbol files to the folder resources/symbols of your app.ducx project. In the example, the binary content of the symbol files referenced in the symbol definition is retrieved from the relative path resources/symbols.

Symbols can be referenced by object classes, branches, toolbar buttons, form pages and access types.

The enumeration item SF_BMP16 is available for backward compatibility and should not be used any longer. Define at least a 16 x 16 pixels GIF and PNG symbol for the enumeration items SF_GIF16 and SF_PNG16. In some cases bigger symbols are displayed in the user interface. For these cases the enumeration items SF_PNG20, SF_PNG24, SF_PNG256 and SF_PNG512 are available. If no symbol of the required size is defined, a fallback symbol will be displayed in the user interface.

In this example, two symbols are defined. The symbol files must be imported to the corresponding folder in the Fabasoft app.ducx project.

Example

resources APPDUCXSAMPLE@200.200 {
  import COOSYSTEM@1.1;
  import COODESK@1.1;
  import COOACLEDIT@1.1;

  symbol SymbolPrintInvoice {
    images<symbolimageformat, content> = {

      {
        SF_GIF16,
        file("resources/symbols/PrintInvoice16.gif")
      },
      {
        SF_PNG16,
        file("resources/symbols/PrintInvoice16.png")
      },
      {
        SF_PNG512,
        file("resources/symbols/PrintInvoice512.png")
      }
    }
  }

  symbol SymbolApprove {
    images<symbolimageformat, content> = {

      {
        SF_GIF16,
        file("resources/symbols/Approve16.gif")
      },
      {
        SF_PNG16,
        file("resources/symbols/Approve16.png")
      }
    }
  }
}