[widgets]

The [widgets] section of the initialization file defines logical widgets for use in Form components on Windows.

LogicalWidgetName=PhysicalWidgetName{(WidgetProperty1=Value1;WidgetProperty2=Value2;...)}

Description

Each logical widget maps to a physical widget, and optionally sets some of its properties. The property values defined in this section override the hard-coded defaults of the physical widget.

The maximum length of the widget property string is 1024 characters.

You can use this section to define your own logical widgets.

Naming Rules for Logical Widgets

If you define your own logical widgets, follow these guidelines:

  • Maximum length: 16 characters
  • Valid characters: A-Z, 0-9
  • First character must be a letter (A-Z)
  • Uniface reserved words are not allowed
  • Do not use widget names that begin with IDE or IDF. These are reserved for internal use.
  • Do not use a name that is the same as a physical widgets (and do not add a custom physical widget using the same name as any existing logical widget)
  • Avoid names starting with the letter U to prevent conflicts with Uniface objects

Uniface Widgets

The usys.ini for Uniface includes some definitions are used only in the Uniface IDE and Debugger. These must be present for these applications to work properly.

[widgets]
; Logical to physical widget mapping
EditBox=ueditbox(font=editfont;autoselect=on;dimmedbackcolor=off)
CommandButton=ucmdbutton(tooltip=on;font=buttonfont;actoneachclick=on)
DropDownList=udropdownlist(font=listfont;forcefit=on;dimmedbackcolor=off;v8_printing=on)
Combobox=ucombobox(font=listfont;dimmedbackcolor=off;autoselect=on)
CheckBox=ucheckbox(font=label;fittotext=off)
RadioGroup=uradiogroup(font=label)
Map=umap(font=label)
ListBox=ulistbox(font=listfont;dimmedbackcolor=off)
Egrid=egrid(font=editfont;labelfont=editfont;bordertype=flat;bordercolor=silver)
SpinButton=uspinbutton(font=editfont;autoselect=on;dimmedbackcolor=off)
Picture=upicture
Hyperlink=uhyperlink(font=HyperLabel;transparency=on)
OleContainer=uOleContainer
OcxContainer=uOcxContainer
DragSource=udragdrop(source=on;label=on;sourcefeedback=icon)
DropTarget=udragdrop(target=on;label=on;targetfeedback=copy,move;targethilite=halftone)
Slider=uslider
Meter=umeter
Tree=utree
Tab=utab
TabEx=utabex
FormContainer=ucontainer
HTML=uhtml
Progressbar=uprogressbar(orientation=horizontal;smooth=false;range=100)
; colortype = web | system
ColorList=ucolorlist(colortype=web;font=listfont)
ColorBox=ucolorbox(font=editfont;frame=on;3d=on;dimmedbackcolor=off)
OutputBox=uoutputbox(font=monosmall)
MonthCalendar=umonthcalendar
RichEditBox=urtfeditbox(font=editfont;toolbar=font,textcolor,attribute)

; Logical widgets for development environment
NoEditBox=ueditbox(font=editfont;3d=off;dimmedbackcolor=off)
MessageBox=ueditbox(font=editfont)
UnifaceButton=ucmdbutton(tooltip=on;font=buttonfont;representation=uniface)
HeaderButton=ucmdbutton(tooltip=on;font=buttonfont;representation=header)
SourceEdit=usrcedit(font=procboxfont;language=uniface;indenttabs=on;indentsize=4;indentguides=off)

; Logical widgets Uniface 9.7:
; 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) 
				
; Custom widgets for development environment
RichEdit=urichedit(font=procboxfont;maxtags=20;procbox=on)
HtmlEdit=urichedit(font=procboxfont;procbox=on;language=html)
HotSpot=uhotspot(cursor=on)
UniForm=uniform(backcolorselect=#E1E8F5;forecolorselect=black)
Nav=unav(font=label)
Gab=ugab
Canvas=ucanvas

; Special frames
.L=ulabel(transparency=off;labelfont=label;inheritcolors=false;anchor=false)
.P=ucmdbutton(tooltip=on;autolabel=off)
.C=ucheckbox(v52=on)
.I=upicture

Changing Widget Defaults

In the following example:

  • The MonthCalendar logical name has been changed to Calendar
  • The order of the widgets has been changed. This changes the order in which widgets are listed in the Widget Type field in the Properties Inspector.

    The EditBox is first item so it remains the default value, but the others are now displayed in alphabetical order.

[widgets]
; Logical to physical widget mapping
EditBox=ueditbox(font=editfont;autoselect=on;dimmedbackcolor=off)
CheckBox=ucheckbox(font=label;fittotext=off)
Calendar=umonthcalendar
ColorBox=ucolorbox(font=editfont;frame=on;3d=on;dimmedbackcolor=off)
; colortype = web | system
ColorList=ucolorlist(colortype=web;font=listfont;dimmedbackcolor=off) 
CommandButton=ucmdbutton(tooltip=on;font=buttonfont;actoneachclick=on)
Combobox=ucombobox(font=listfont;dimmedbackcolor=off;autoselect=on)
DragSource=udragdrop(source=on;label=on;sourcefeedback=icon)
DropTarget=udragdrop(target=on;label=on;targetfeedback=copy,move;targethilite=halftone)
DropDownList=udropdownlist(font=listfont;forcefit=on;dimmedbackcolor=off;v8_printing=on)
Egrid=egrid(font=editfont;labelfont=editfont)
FormContainer=ucontainer
HTML=uhtml
Hyperlink=uhyperlink(font=HyperLabel;transparency=on)
ListBox=ulistbox(font=listfont;dimmedbackcolor=off)
Map=umap(font=label)
Meter=umeter
OleContainer=uOleContainer
OcxContainer=uOcxContainer
OutputBox=uoutputbox(font=monosmall)
Picture=upicture
Progressbar=uprogressbar(orientation=horizontal;smooth=false;range=100)
RadioGroup=uradiogroup(font=label)
RichEditBox=urtfeditbox(font=editfont;dimmedbackcolor=off;toolbar=font,textcolor,attribute)
Slider=uslider
SpinButton=uspinbutton(font=editfont;autoselect=on;dimmedbackcolor=off)
Tree=utree
Tab=utab
TabEx=utabex
...

Related Topics