Setting Properties in Initialization Files

To provide your preferred default values for many widget properties, you can define or modify logical widget definitions in the application's initialization file. These are named configurations for a variety of user interface elements, such as field widgets for desktop and web components, area frames in Form components, and entities. For more information, see Logical Widgets.

The values in the initialization file can be overridden by declarative or dynamically-set values at runtime, but they provide a common basis, so that all objects of the same type have a common appearance.

To define default widget properties:

  1. Edit the application's initialization file (for example, usys.ini).
  2. Modify or define logical widgets for Dynamic Server Page components.
    Dynamic Server Page Widgets
    ObjectFile SectionInitialization SettingRemarks

    Field widgets

    [webwidgets]

    LogicalWidgetName

    User-defined logical widgets. A default set is provided. For more information, see Widgets for Dynamic Server Pages.

    For example:

    [webwidgets]
    ; HTML widgets
    EditBox=htmlinput(html:type=text;detail=dblclick)
    TextArea=htmltextarea(detail=dblclick)
    CommandButton=htmlinput(html:type=button;clientsyntaxcheck=false)[syntax=ned]
    CommandButton_updatable=htmlinput(html:type=button;clientsyntaxcheck=false)
    CheckBox=htmlinput(html:type=checkbox)
    ...	
    				
    ; Uniface widgets
    ...					
    FlatButton=plain(rawhtml=false;clientsyntaxcheck=false)[syntax=ned]
    FlatButton_updatable=plain(rawhtml=false;clientsyntaxcheck=false)
    AttributesOnly=genericHTML
    DspContainer=dspcontainer

    Note: It is not possible to set default properties for widgets in Static Server Page components.

  3. Modify or define the default definitions of the user interface objects of desktop components. You can also define your own logical widgets for field widgets and frames.
    Desktop Application Widgets
    ObjectFile SectionInitialization SettingRemarks

    Application Shell

    [application]

    Shell

     

    Form (and Modeled Form)

    Window

     

    Menus

    Menu

    You can define default colors (or images), as well as colors to use for highlighting menu items or panel buttons

    Panels

    Panel and ButtonStyle

    Default entity widget

    DefEntity

    Default logical widget for udefentity widget, the default entity widget if Egrid is not selected.

    Egrid entity widget

    [widgets]

    Egrid

    Default logical widget for egrid entity widget. User-defined logical widgets, not supported. For more information, see egrid (Grid).

    Field widgets

    LogicalWidgetName

    User-defined logical widgets. A default set is provided. For more information, see Widgets for Forms and Reports.
    Labels.L=ulabelPhysical widget definition for all labels
    Area frames

    [areaframes]

    FrameDefault logical widget for uframe widget.

    LogicalFrame Name

    User-defined logical widgets for uframe.

    User-defined entities[entities]EntityNameName-based configuration for styling entity frames.

    For example:

    [widgets]
    EditBox=ueditbox(font=editfont;autoselect=on;dimmedbackcolor=off)
    CommandButton=ucmdbutton(tooltip=on;font=buttonfont;actoneachclick=on)
    DropDownList=udropdownlist(font=listfont;forcefit=on;dimmedbackcolor=off)
    Combobox=ucombobox(font=listfont;dimmedbackcolor=off)
    CheckBox=ucheckbox(font=label;fittotext=off)
    ...