Setting design system object options

A Genexus Design System object may expose design options. They are automatically set by K2BTools in the master page code and, for objects that do not use one, in the events code. Sometimes, however, K2BTools does not know that design system object options must be set in a given object and it does not include the code to do so. An example is an object that is called using call and popup. When called, it works fine but not when used in a pop up.

If options are not set, objects do not display correctly. Colors, fonts, etc. are lost.

To fix the problem, the developer must set the design system options by adding the following lines in the start event:

    For &DesignSystemOption in K2BTools.GetDesignSystemOptions()
        DesignSystem.SetOption(&DesignSystemOption.AttributeName, &DesignSystemOption.AttributeValue)
    EndFor

The &DesignSystemOption variable has the K2BAttributeValue.Item data type.

See the K2BTools.GetDesignSystemOptions object