Rocket Uniface User Forum

 View Only

Modernizing Uniface 9.7, Part 2

By Uniface Test posted 11-02-2015 08:45

  

(Original creator: thenees)

In my previous post, I started explaining what we have done to give the Uniface Development Environment a fresh look. Modernizing Uniface 9.7 in 10 easy steps This post is about the steps that were needed to make screens white. In theory that can be done by changing just one setting in your .ini file. But in real life there are always some small differences between theory and practise.



The small tools that I made to make my life easier are available for download, but:

DISCLAIMER The tools described in this posting are not supported Uniface software. You can download them and use them, modify to your own taste and use them at your own risk. You need the DICT model to be present in your repository before you can compile and use the tool. Be absolutely sure you have a backup of your dictionary before using any of these tools! You can download them tools.zip. When you make an improvement to these tools that might be useful to the community please share it.


Step 1: Make the background of all Forms white

Goal

Making all Forms white can be accomplished by a simple change in the .ini file. Included in this step is altering the Application Shell, the Menu’s and the Panels so they look nice in combination with the white Forms.

[application] shell=ushell(backcolor=#F9FCFF) window=uwindow(backcolor=white)menu=umenu(backcolor=white;forecolor=black;backcolorselect=#0084CC;forecolorselect=white;backcolorfill=flat)panel=upanel(backcolor=white;backcolorhover=white;backcolorlocked=#55C1E8;backcolorselect=#97D5EC;bordercolorhover=#55C1E8;bordercolorlocked=#0084CC;bordercolorselect=#0084CC)

As you can see we made the Application Shell a very light blue for a subtle color difference between the Forms and the Application Shell. The Forms were given a white background. The Menus are now white with a blue selection color and the Panels are white with blue accepts. This was all done with properties that already exist in Uniface 9.6.

Challenge

In theory changing .ini settings should be enough. But unfortunately a small percentage of the Forms had either an index color or a foreground or background color set. That was never noticed before because these were set to the default grey background and black foreground. So after changing the .ini file these Forms remained grey. The challenge is to find all forms with a color and remove the color with minimal effort.

Tool

The tool is called U97_FORMCOLOR. When you press Retrieve it will show all Forms in your dictionary that have an Index color or form property color set. It uses your current settings in the [foreground]/normal and [background]/normal sections of your current .ini file to translate the index color to a foreground and background color.  It will also show what window color you have set in the .ini file. There are buttons to convert RGB to HEX colors and vice versa. It did not add a translation of Web colors as that was too much work and I did not need it. There are buttons to put the Index colors in the Window Properties and remove the Index color. One that only does that when there is no window property color and one that does it always. And there is a button to remove the property color when it is the same as the .ini color. Nothing gets stored until you press the Store button so you can play around a little. Please feel free to change the tool for your own purposes.



Step 2: Remove the color from the painted entities

Goal

After step 1 we saw strange grey blobs on some of our nice white screens.


Some of our painted entities had an index color or foreground or background color set, and were painted as markers for referential integrity or other technical reasons. To be precise these only show up when they are painted three or more character cells wide. We needed to remove these colors as well.

Challenge

The challenge is to find all painted entities on all forms that have a color set and to remove the colors with minimal effort. Using SQL is not an option as the index color for the painted entities is stored in the paint area (FORMPIC).

Tool

I build a small tool to search for a painted entities with a color with a few additional buttons to manipulate or remove the color. Since the Index color of a painted entity is stored in the form paint tableau I had some fun deciphering and manipulating that. The tool is called U97_ENTCOLORFRM. When your press Retrieve it will retrieve all painted entities that have an index color or an entity property color set. On a large dictionary this can take some time as it have to search the paint areas (FORMPIC) for the index colors. All buttons have the same function as the previous tool.



Step 3: Remove the color from the modelled entities

Goal

After step 2 we unfortunately still saw grey blobs

Some entities had a foreground or background color set in the Application Model (no index color there), and were painted as markers for referential integrity or other technical reasons. These colors needed to be removed as well.

Challenge

The challenge is to find all entities in all models that have a color set, and remove it with minimal effort.

Tool

The tool is called U97_ENTCOLORMOD. It searches for modelled entities with a color and has a few additional buttons to manipulate or remove the color. It works very similar to the previous tools. The differences are caused by Entities in the Application Model not having Index colors.



Step 4: Visibility of Grids

Goal

A Grid always has a white background and on our now white Forms it was not so clear to see what area a Grid was occupying on a Form.



We needed borders around the Grids.

In Uniface 9.7 there are new properties that you can use to give the Grid widget a border: ·         BorderType ·         BorderColor ·         BorderWidth

We want to apply BorderType=Flat and BorderColor=Silver to all painted Grids.



>

Challenge

The challenge is to find all painted Grids, and to apply the change with minimal effort.

Tool

The tool is called U97_GRIDBORDER. This one was kept very simple. It just retrieves all entities that are painted as Grids and has a button to add properties to them.



Step 5: Multi-occurrence entities

Goal

This was an issue that was specific for our project but I have included it since in your application you may want to update properties of non-Grid entities too. Earlier we removed the color from all entities, but in the Development Environment there are multi-occurrence entities that need to look similar to Grids. Since Grids do not follow the background color of the Form but always stay white we had to make these multi-occurrence entities consistent with that.



Like in Step 4, a white data area on a white form does not look so good without some kind of border. So we wanted to add new properties for the entity frame too.

In Uniface 9.7 there are new properties for the default entity: ·         BorderColor ·         BorderType ·         BorderRadius ·         DropShadowColor ·         BackColorStart ·         BackColorFill ·         GradientStart ·         Attach ·         AttachMargin

We want to set BorderColor=Silver and BorderType=Flat on all non-Grid, multi-occurrence entities.



Challenge

Finding the all painted entities that are not using a grid widget and are painted with a vertical repetition of occurrences. This information is stored in the form paint. Apply BorderColor=Silver and BorderType=Flat to those entities.

Tool

The tool is call U97_MULTI_OCC. When you press retrieve it shows all entities that are painted with an occurrence repetition and that is not a Grid. It can be a bit slow on large dictionaries as it needs to look in the paint area of the Form for each painted Entity. The functionality is simple, just a button to add some properties to all painted entities found. NB: We are aware that in this first release the frame does not look quite right yet when a multi-occurrence entity is painted to look like a grid, as there is no room for the frame.  An alternative for your application could be to give the entities and the form background different colors. In the next (final) post I will explain what we did with the buttons.



 

1 comment
5 views

Permalink

Comments

05-10-2019 08:03

Hi Theo,
Excellent report on what to expect when modifying the GUI of a Uniface application (as the IDF is a Uniface application itself).
I suppose your report can be a scenario for customers who also want to modernize their GUI's.
Looking forward to part three!
Cheers,
Arjen