2017 June Release

Control ArgumentsPermanent link for this heading

Control arguments can be used to influence the control behavior. They are defined in the app.ducx user interface language within brackets after the control.

Syntax

app.ducx User Interface Language

...

layout {
  row {
    CustomControl("arg1=value arg2=value ...") property {
      ...
    }
  }
}

height and width are predefined arguments, which can be accessed in the client JavaScript using the GetHeight() and GetWidth() functions. You can also define arbitrary control arguments, which can be accessed using the GetOptions() function.

Note: GetOptions() is also used for control options as described in the next chapter.

Example

app.ducx User Interface Language

...

layout {
  row {
    // provide three control arguments
    CustomIntegerControl("height=100 width=50 style='h3'") ctrlsampleinteger {
      colspan = 4;
      labelposition = left;
    }
  }
}
...

render.js

this.OnRender = function CustomObjectListControl_OnRender(output)
{

  // retrieve the control arguments
  var options = this.GetOptions();
  // print height and width; options.style is directly used as HTML tag
  output.Push("<" + options.style + ">" + this.GetHeight() + "</" + options.style + ">");
  output.Push("<div>" + this.GetWidth() + "</div>");
}