How to cooperate entity occs scrollbars and paintedfieldproperties?

Author: dammie@seznam.cz (dammie)

Hello, I need set position of fields according occurence numbers.... but $paintedfieldproperties has parameter paintedoccurence and it not correspond to occurence numer in entity -- when scrollbar is used position of field is wrong... ( it paintedoccurencies and ocurencies of entity correspond only on first visible occurencies in entity ) Is there trick how to coordinate paintedocurence with entity occurence? Thanks for help   dammie

2 Comments

  1. Hi dammie, IIRC, unfortunately uniface has no way to link the occurence number to the "painted" occurence number. If you have painted a repetition of 3, but have a hitlist of 4, you can not questions which occurence is shown on top of the visisble area.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Hi dammie, There is an open wish for this on the Uniface Wish List (see new proc function $screencurocc). And in case you are using a static hit list then you could use the <Format> trigger of a field to determine the "paintedcurocc". Each time a user is using the scroll bar the <Format> of all painted occurrences is fired. By checking $curocc in the <Format> trigger it is possible to determine the relation between the painted occurrence and the occurrence in the hit list. The <Format> trigger of the different painted fields is of course not only fired when the scroll bar is used and it is therefore necessary to write some Proc logic that can determine that the user is actually manipulating the scroll bar (in which case an update of $paintedfieldproperties of all painted fields is required). I could send you a small sample that demonstrates how such a solution could look like (in case you are interested). Please note that the sample will only work for a static hit list. Adding or removing occurrences to or from the hit list might give unexpected results. Hope this helps. Kind regards, Daniel Iseli Uniface Support


    Author: diseli (daniel.iseli@uniface.com)