[SOLVED] Unifield Inverse

Author: roger.wallin@abilita.fi (rogerw)

Hi, We have some old forms with unifields used as "label"-fields. In Uniface 9.7 these seem default to grey with black text. However due to the help a unifield-field should default to Inverse and so black characters on white background. To me it seems that in my application default is "Unifield=non-inverse". As I change the Unifield-field layout to INV, I get the wanted behaviour of black text on white background. Is there a way to change the default application behaviour to Unifield-INV, without having to change all Unifield-fields? Regards RogerW.

 

Help: Inverse is the default video attribute for unifields in Windows. No special color set is needed for inverse and it can be combined with any of the other four video attributes. By default, a unifield has background color 7, and foreground color 0 (black characters on a white background). If you make the unifield non-inverse, the default combination is background color 0 and foreground color 56 (black characters on a gray background).

16 Comments

  1. Hi, I start to feel dumb, but I can't leave this before I understand it. No Uniface programmer at our company can explain it to me... What's the reason to having this 3-level setting of eg. Inverse. 1. There is the default value (nothing set, interpreted as default and so INV). 2. You can change this by changing it on form-level per field by picking one of "Default", "Yes" or "No". This value isn't visible/setable at all, other than by enabling the specific popup menu. 3. You can overrule this by changing the Field properties Layout, which makes it visible in the Field Properties Layout as NIN or INV.  Is nr (2.) some old way of changing the field on form-level, and thats the reason why we have it set, although we havent even used the popup-menu, at least not for many years.  Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  2. Hi, I have to admit that adding a new unifield, then Inverse is the default video attribute for unifields with empty Layout. However my old unifields seem to default to NIN, ie. if the field has empty Layout, and it's an old migrated field then it's grey.  Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  3. Hi RogerW, In case the field layout properties of two Unifield's are the same, but they are displayed differently at runtime then the specific settings are probably defined on the FORMPIC. Have you already checked this? Please note that by default the GFP (Form Painter) will not show the popup menu with the Video Attributes. You need to enable the specific popup menu in the Component Editor Preferences (IDF menu Utilities > Preferences > Component Editor...). Hope this helps. Regards, Daniel Iseli Uniface Support


    Author: diseli (daniel.iseli@uniface.com)
  4. Hi Daniel, By enabling the specific popup menu I can see that the Inverse-property of the old Unifields  is usually set to "No" and a newly added unifield is set to Default. However the FORMPIC somehow goes over my head. I do have a form where I can retrieve a form and it's FORMPIC field, but I can't see anything there about these specific Unifield fields. Although there are info about other fields. TYP=F·;NAM=NIMI.KIOUT·;WID=1·;HEI=1·;INV=FTYP=E·;NAM=CILANARE.KIERTO·;WID=32·;HEI=1·;HOC=32·;VOC=1TYP=F·;NAM=KTUNNUS.CILANARE·;WID=1·;HEI=1·;INV=FTYP=F·;NAM=PPISTENR.CILANARE·;WID=1·;HEI=1·;INV=FTYP=E·;NAM=PALPISTE.KIERTO·;WID=28·;HEI=1·;HOC=28·;VOC=1TYP=F·;NAM=PPISTENIMI.PALPISTE·;WID=26·;HEI=1·;INV=F I suppose my question now is: Where in source-code can I see that, eg. unifield-field "B.DUM" has an inverse-property "Default" and not "No" or "Yes" or vice versa? Regards RogerW. PS. As you pointed me to the popup-menu, I think I can now change these Unifields manually to get them homogenous.  


    Author: rogerw (roger.wallin@abilita.fi)
  5. Hi RogerW, perhaps you can have a look at $uuu about how to interpret the formpic. Using an export file as source for information, I think the important part is: ;INV=F&uFRM; Greetings from Frankfurt/Germany, Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  6. Hi RogerW, Thanks for the info. In the provided excerpt of the FORMPIC I can find 4 fields (see TYP=F) and each of them has Inverse=No (INV=N) defined:

    • TYP=F·;NAM=NIMI.KIOUT·;WID=1·;HEI=1·;INV=F
    • TYP=F·;NAM=KTUNNUS.CILANARE·;WID=1·;HEI=1·;INV=F
    • TYP=F·;NAM=PPISTENR.CILANARE·;WID=1·;HEI=1·;INV=F
    • TYP=F·;NAM=PPISTENIMI.PALPISTE·;WID=26·;HEI=1·;INV=F

    Hope this helps. Regards, Daniel P.S. Good to hear that the mentioned pop menu is helpful.


    Author: diseli (daniel.iseli@uniface.com)
  7. Hi, I suppose that  those dummy-unifields  ("non-database" or "boilerplate" not available in the model) that are provably set to Inverse=No, and not mentioned in FORMPIC, are contained and set to "No" in some other source-table/field.  Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  8. Hi RogerW, What do mean exactly? There are only two places (AFAIK) where you could define the inverse attribute of a dummy Unifield: in the (form level) field properties or on the FORMPIC. Unless, of course, the video attributes are set in code (by using fieldvideo or $fieldvideo). Or there's also the ASN setting $DEF_VIDEO, but this will influence all fields in the application. Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  9. Hi, Ok, I can find it in the FORMPIC of the export-file. I probably have som problems with my UFORM-form. Perhaps wrong DICT-model, as this is marked 09-jun-97  :-( . Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  10. Hi RogerW, Thanks for the info. And a DICT model from 97 is definitely too old (that's from version 7). You always should only use the DICT model that comes with the Uniface version you are using. You can import the "up-to-date" DICT model (or meta dictionary) by executing the idf command line switch "/ins meta". Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  11. Hi RogerW, Yes, that's (most likely) the case. I cannot confirm this for sure, but the field properties probably have been introduced after the FORMPIC settings. This might have happened in version 6 (the first release I've worked with). I seem to remember that in version 5 a lot more was done on the form painter (FORMPIC). And back then there probably was not popu menu, since everything was done by keyboard (even on Windows). Maybe someone with more version 5 experience can confirm this to us. Hope this helps. Regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  12. Hi RogerW, it's more or less the same challenge Theo Neeskens faced when modernizing the 9.7 IDF. And the cure for your inversion settings may be somewhere in the tools Theo published.   I personally would prefer using the export xml as a base and some intelligent text processor to modify the "INV=F" in the FORMPIC. As it's a oneoff job, it may even been done with some simple texteditor. Still it will be much much faster than dealing with the popup menues etc. in the IDF.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  13. Hi Ulrich, We should probably replace those fields with Labels and NoEditBoxes. On the other hand, it's a bit nostalgic to have forms from 1990s, and those forms aren't that often used. They are probably getting modern again, just see the flat buttons. I've to see how dangerous it is to change them in the export-file. Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)
  14. I've moved the off-topic posts here. Kind regards, Daniel


    Author: diseli (daniel.iseli@uniface.com)
  15. rogerw said I've to see how dangerous it is to change them in the export-file.

    From my experiences: ... as long as you keep the "old" export and have a quick import and check after the change, (perhaps into a separate repository database etc.) the risk should be pretty small.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  16. Hi, In case someone has the same problem. In export-file, replacing "&uSEP;INV=F&" with "&" seem to remove those hidden FORMPIC "INV=False". Regards RogerW.


    Author: rogerw (roger.wallin@abilita.fi)