[SOLVED] $paintedfieldproperties anyone?

Author: gianni.sandigliano@unifacesolutions.com (gianni)

Hi Unifacers, I would like to move at runtime a small Uniface button on top of a label using $paintedfieldproperties() The button field I am trying to move is called HEAD3_CLEAR and it is originally positioned at 65,10 with size 2,1, within a DUMMY entity; a label is adjacent to the button on the left ending its used space at column 64 and it has its own text attribute. When the form is executed I want to move button two columns on the left at absolute position 63,10 on top of the label. I am using this instruction: $paintedfieldproperties("HEAD3_CLEAR.DUMMY","1","XPos·;ZOrder") = "XPos=63·;ZOrder=Top" But NO WAY...the button does not move from its initial position! Honestly speaking current CHM (9.7.04.G420) is not helping too much: - Examples when setting new values for an object are sometimes including third parameter of the function and sometimes NO. - Third parameter is described as an associative list while (I think) it should be a normal list (NOT associative!) - I did not find any examples including ZOrder I am on Uniface 9.6.04 and AFAIK: - $paintedfieldproperties is available since U9.1 - From U9.7.01 when a field is moved with $paintedfieldproperties associated label is moving too Other infos: - I am on Windows GUI. - I am moving a button havi rapresentation "Uniface button". - The label to be overlapped stay fixed in its position. - It is a NON-MODAL form. - There are NO splitbars in this form. Can someone help? Gianni

4 Comments

  1. Hi Gianni, That's correct. The following is mentioned in the description of $paintedfieldproperties:

    "When $paintedfieldproperties is used in the Execute trigger, it must be preceded by a show statement. This ensures that the painted fields are available, which is otherwise not the case when the Execute trigger is executed." Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  2. It works! @Knut: THANKS! @Daniel: after having found more glitches into CHM I went for a vanilla trial&error approach. I should have been more confident with Uniface CHM, as usual... The classic RTFM applies to myself in this case. This thread could be marked as Solved! Regards, Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  3. Are you doing a 'show' before you try to move the field? Knut


    Author: Knut (knut.dybendahl@gmail.com)
  4. Hi Knut, NO... Yours is a valuable info! Is the $paintedfieldproperties functionality available only AFTER the form has begun the show/edit session? Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)