Uniface Support for Windows 11
With the release of Windows 11, Microsoft has updated the styling of the user interface, and this has consequences for the look and feel of your Uniface applications.
With each major Windows release, we update Rocket® Uniface to ensure that Uniface applications follow the new look and feel, and this release is no different. Most of the issues you may run into are related to widget frames and borders.
In this blog we will explain the Windows 11 issues we encountered, and what you need to do to address them. For those of you in a hurry, we’ll start with what you need to do.
What do I need to do to run my Uniface application on Windows 11?
You need to:
- Make sure you have an updated license that includes the Windows 11 license feature. Contact your Rocket® Uniface representative.
- Update your Uniface installation to at least patch level 011 (Uniface 10.4.01.011 or 10.3.03.011).
- Edit your application’s initialization file.
- In the [application] section, define the Windows definition as follows:
- In the [upi] section, remove the cell height and linespace settings, if specified.
Note: The Uniface installer will automatically make these changes to usys.ini when upgrading an installation. If you apply patches just by extracting from a zip file and overlaying the existing files, you will need to manually edit usys.ini with these changes.
Why do I need to make these changes?
Your application will look better! Without these changes, you will find that text in input fields will be truncated at the bottom and the blue line that indicates focus may not display properly for adjacent fields.
Windows 11 styles edit boxes and many other widgets with a heavy bottom border. For the field that has focus, this bottom border is blue.
In Uniface applications, this bottom border may not be visible for fields that are vertically adjacent to each other. For example:
This is because prior to this Uniface release, widget frames are usually drawn slightly outside the area of the widget causing widget borders to overlap. With Windows 11 styling, this overlap is much more visible, so we have changed the default behavior to draw the border within the widget area frame. However, there is now less room for the text within the widget, resulting in text that is slightly cut off at the bottom. For example:
To allow enough room for the text, the default Uniface configuration has been changed to use a cell height of 110 % instead of 100 %.
Are there other changes I should know about?
The Radio Group buttons now look much better, especially when one is selected. Instead of appearing as a hexagon, it is now truly round. You will also see this improvement on Windows 10 machines!
Note: For this change to take effect, the widget’s Transparency property must be false (which is the default).
What if I still have problems with the way my application looks?
Changing the cell height also affects the size of the form windows. If this is a problem for you, you could choose to use a cell height of 105. Anything less, and the text may be cut off a bit.
But in fact, you now have other possibilities for fine-tuning the layout and appearance of forms:
- You can now set the window properties Cell Height and Line Space for individual forms. The Windows initialization setting sets these values at an application level, but when you are designing new forms or updating old ones, you can override that in the form’s Window properties dialog. This gives you much more fine-grained control over the layout and positioning of fields in the form. (More about this in a future blog.)
- For many widgets that have the 3-D property turned on, you can choose to have widget frames drawn outside the widget area using the Draw 3-D Frame Outside (DrawOutside) property. This can be set in the Widget Properties dialog for the following widgets:
- ueditbox (EditBox)
- ucombobox (Combo Box)
- udropdownlist (DropDownList)
- uoutputbox (OutputBox)
- urtfeditbox (RichEditBox)
- uspinbutton (SpinButton)
Other changes you may notice
For the most part, Uniface inherits the look and feel of Windows 11 from the operating system itself, so you may notice:
- Buttons and input fields have a flat look with light borders
- Cursors—in Windows 11, cursors do not blink as you type in input fields, for example, in the Uniface IDE, Uniface Installer, Microsoft Windows Explorer, and so on.
- Scroll bars—most scroll bars are much thinner and the buttons at the top and bottom have disappeared
- Icons—Windows 11 has new icons for DTDs, DB files, CSS files, property files, and zip files.
That's it! Running your Uniface applications (including the Uniface IDE) on Windows 11 is no problem. All you need is the an updated license and Uniface installation, and a simple change to your initialization file.