Skip to main content

Uniface grid logical widget(s)

  • June 30, 2021
  • 3 replies
  • 0 views

Gianni Sandigliano
Forum|alt.badge.img

Hi Unifacers,

I am requested to try to configure 3 different basic modes for Uniface entity grid different usages, while leaving original logical widget egrid into .ini files untouched.

Differences are quite simple:
; The original one:
- Egrid=egrid(font=editfont;labelfont=editfont;bordertype=flat;bordercolor=silver)
; The new ones:
- Egrid_std=egrid(font=SansSmall;labelfont=SansSmall;bordertype=flat;rowheight=16px)
- Egrid_dense=egrid(font=SansTiny;labelfont=SansTiny;bordertype=flat;rowheight=12px)
- Egrid_rare=egrid(font=SansLarge;labelfont=SansLarge;bordertype=flat;rowheight=20px)

Now with first tries I've found more issues:
1) During development I cannot see my new logical widgets available to apply them to an entity.
2) If I force them into repository I do not see them working properly: neither fonts or row height.
3) After having applied solution #2, reentering with into component using it show entity widget as "(Unknown)".

In a sentence: it does NOT work!

Questions:
- Had anyone already tried a similar customization?
- Am I missing anything or doing it a wrong way?
- Any tip or trick to have it working?

Thanks in advance for any answer.

Regards,
Gianni

3 replies

Barbara Douma

Hi Unifacers,

I am requested to try to configure 3 different basic modes for Uniface entity grid different usages, while leaving original logical widget egrid into .ini files untouched.

Differences are quite simple:
; The original one:
- Egrid=egrid(font=editfont;labelfont=editfont;bordertype=flat;bordercolor=silver)
; The new ones:
- Egrid_std=egrid(font=SansSmall;labelfont=SansSmall;bordertype=flat;rowheight=16px)
- Egrid_dense=egrid(font=SansTiny;labelfont=SansTiny;bordertype=flat;rowheight=12px)
- Egrid_rare=egrid(font=SansLarge;labelfont=SansLarge;bordertype=flat;rowheight=20px)

Now with first tries I've found more issues:
1) During development I cannot see my new logical widgets available to apply them to an entity.
2) If I force them into repository I do not see them working properly: neither fonts or row height.
3) After having applied solution #2, reentering with into component using it show entity widget as "(Unknown)".

In a sentence: it does NOT work!

Questions:
- Had anyone already tried a similar customization?
- Am I missing anything or doing it a wrong way?
- Any tip or trick to have it working?

Thanks in advance for any answer.

Regards,
Gianni

Hi Gianni,

Unlike field widgets, entity widgets do not support logical widgets. For the Grid and the DefEntity widget, you can set default properties in the initialization file, but in different sections—[widgets] and [entities]. 

This is documented on https://documentation.uniface.com/10/uniface/componentConstruction/entityWidgetProperties.htm but it's worth repeating in the Grid widget description itself. We will add it in a future patch.

Regards — Barbara Douma


Barbara Douma

Hi Gianni,

Unlike field widgets, entity widgets do not support logical widgets. For the Grid and the DefEntity widget, you can set default properties in the initialization file, but in different sections—[widgets] and [entities]. 

This is documented on https://documentation.uniface.com/10/uniface/componentConstruction/entityWidgetProperties.htm but it's worth repeating in the Grid widget description itself. We will add it in a future patch.

Regards — Barbara Douma

IN fact, I notice that the https://documentation.uniface.com/10/uniface/_reference/widgets/Grid.htm already has this note:
Note: You can change the properties for this widget, but it is not possible to map your own logical widget to egrid


Gianni Sandigliano
Forum|alt.badge.img

Hi Unifacers,

I am requested to try to configure 3 different basic modes for Uniface entity grid different usages, while leaving original logical widget egrid into .ini files untouched.

Differences are quite simple:
; The original one:
- Egrid=egrid(font=editfont;labelfont=editfont;bordertype=flat;bordercolor=silver)
; The new ones:
- Egrid_std=egrid(font=SansSmall;labelfont=SansSmall;bordertype=flat;rowheight=16px)
- Egrid_dense=egrid(font=SansTiny;labelfont=SansTiny;bordertype=flat;rowheight=12px)
- Egrid_rare=egrid(font=SansLarge;labelfont=SansLarge;bordertype=flat;rowheight=20px)

Now with first tries I've found more issues:
1) During development I cannot see my new logical widgets available to apply them to an entity.
2) If I force them into repository I do not see them working properly: neither fonts or row height.
3) After having applied solution #2, reentering with into component using it show entity widget as "(Unknown)".

In a sentence: it does NOT work!

Questions:
- Had anyone already tried a similar customization?
- Am I missing anything or doing it a wrong way?
- Any tip or trick to have it working?

Thanks in advance for any answer.

Regards,
Gianni

Hi Barbara,

thanks for pointing out what I've obviously missed!

I repeat to myself often RTFM but sometimes hands are faster than brain... 🙂

Best Regards,
Gianni