Page 1 of 1

pui.shiftElements() question

Posted: Tue Mar 26, 2013 8:12 am
by Stuart
pui.shiftElements does not work in a record format whose window property is set to "true".
I believe that this is the case because a window may be relatively positioned, as opposed to "non-winow" record formats being absolutely positioned

My code in the window format is below (I have debugged the value for OFFSET, and it appears to be correct). When attempting to shift elements within a record format that is a window, are there any workarounds?

pui.shiftElements(570,1570,parseInt(get("OFFSET"),10));

Thank you, Stuart

Re: pui.shiftElements() question

Posted: Tue Mar 26, 2013 12:55 pm
by Scott Klement
Yes, looking at the code that runs behind pui.shiftElements(), it's clear that it was not designed to work with windows.

One way to workaround is to put all of the elements you wish to move into a layout widget. Then, you can just move the layout, and it'll move all of the elements within it.;

Code: Select all

applyProperty("myLayout", "top", "10px");
(You can use a variable for the position if you like...)

Does that help?

Re: pui.shiftElements() question

Posted: Tue Mar 26, 2013 3:17 pm
by Stuart
Hey, Scott, thanks for the reply. Here is what I would like to happen:

display a subfile in a window, and eliminate unoccupied records in the subfile with the setNumberofRecords() grid function. This part works great.

I have a button that is positioned just below the last element in the grid, and is left aligned with the grid. What I want to do is reposition the button when records are removed (move the button to just beneath the last row).