Rocket Uniface Support Resources

 View Only

Configuring widgets for ChUI (character mode)

  Thread closed by the administrator, not accepting new replies.
  • 1.  Configuring widgets for ChUI (character mode)

    ROCKETEER
    Posted 18 days ago
    No replies, thread closed.

    When running Uniface 10 on Windows then widgets used by an application are defined in the [widgets] section of the INI file. Here a logical widget (with specific settings) is mapped to a physical Uniface widget. For example:

    [widgets]
    EditBox=ueditbox(font=editfont;autoselect=on;dimmedbackcolor=off)


    For details see (e.g.) the following topic in the Uniface Library:

    • Uniface Reference > Configuration Reference > Configuration Settings: Initialization > [widgets]
    This mapping also needs to be done when running Uniface in character mode (ChUI). On non-Windows platforms initialization (i.e. INI) files are not used. Instead, the widget mapping is defined in the [WIDGETS] section of the assignment file.

    [WIDGETS]
    EditBox=ueditbox

    For details see (e.g.) the following topic in the Uniface Library:
    • Uniface Reference > Configuration Reference > Configuration Settings: Assignment > [WIDGETS]

    The usyschr.asn file contains default widget settings for the character mode interface and can be found (by default) in UnifaceAPSInstallDir\uniface\adm (e.g. C:\Program Files\Uniface\Uniface 10 10.4.01\uniface\adm). The file contains the following settings:
    ; logical to physical widget mapping

    [WIDGETS]
    EditBox=ueditbox
    CheckBox=ucheckbox
    RadioGroup=uradiogroup
    DropDownList=udropdownlist
    ListBox=ulistbox
    CommandButton=ucmdbutton


    In case the default Uniface components (like e.g. the Logon dialog box for a database or network path; USYSIDX.FRM) is used in ChUI then the above mentioned default settings are not sufficient. The required widget definitions can be found on Windows (in the usys.ini file located in e.g. UnifaceAPSInstallDir\uniface\adm) in the [widgets] section as logical widgets for Uniface 10:

    ; Logical widgets Uniface 10:
    ; Note: These widgets cannot be used from the Uniface development environment.
    IDFSpeedSearch=ueditbox(font=editfont;onedit=T)
    IDFTextCell=ueditbox(font=editfont)
    IDFButtonBottom=ucmdbutton(representation=Uniface;cursor=uhand;frametype=off;font=IDFButtonText;labelfont=IDFButtonText;backcolor=#01A7E1;backcolorselect=#97D5EC;backcolorhover=#55C1E8;backcolorfocus=#0084CC;forecolor=white;forecolorselect=black;vsize=80;autolabel=F;position=center;valign=center)
    IDFButtonSide=ucmdbutton(representation=Uniface;cursor=uhand;frametype=off;font=IDFButtonText;labelfont=IDFButtonText;backcolor=#01A7E1;backcolorselect=#97D5EC;backcolorhover=#55C1E8;backcolorfocus=#0084CC;forecolor=white;forecolorselect=black;vsize=80;autolabel=F;position=top)
    IDFButtonHeader=ucmdbutton(representation=Header;cursor=uhand;halign=left;valign=center;font=label)
    IDFButtonImage=ucmdbutton(representation=Uniface;cursor=uhand;frametype=off;transparency=T)
    IDFButtonSpecial=ucmdbutton(representation=Uniface;cursor=uhand;frametype=off;font=IDFButtonText;labelfont=IDFButtonText;backcolor=#01A7E1;backcolorselect=#97D5EC;backcolorhover=#55C1E8;backcolorfocus=#0084CC;forecolor=white;forecolorselect=black;vsize=80;POSITION=CENTER)
    IDFOpenProfile=ueditbox(frame=T;font=editfont;autoselect=on;dimmedbackcolor=off;dblclk=detail;multiline=F)


    These settings are also required for the character mode. This can be achieved by adding the following lines to the [WIDGETS] section of (e.g.) the usyschr.asn file:

    ; Logical widgets Uniface 10:
    IDFSpeedSearch=ueditbox
    IDFTextCell=ueditbox
    IDFButtonBottom=ucmdbutton
    IDFButtonSide=ucmdbutton
    IDFButtonHeader=ucmdbutton
    IDFButtonImage=ucmdbutton
    IDFButtonSpecial=ucmdbutton
    IDFOpenProfile=ueditbox

    As a last step the ASN file needs to be loaded by the application ASN file used in character mode by adding the following line:

    #file usysuniface:usyschr.asn

    Or alternatively the complete [WIDGETS] section could be copied to the application specific ASN.

    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------