pui.shiftElements() question

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
Stuart
Profound User
Posts: 30
Joined: Tue Apr 17, 2012 4:37 pm
First Name: Stuart
Last Name: Leonard
Company Name: Summit Holdings
Phone: 813-665-6060
Address 1: 2310 Commerce Point Drive
City: Lakeland
State / Province: Florida
Zip / Postal Code: 33594
Country: United States
Contact:

pui.shiftElements() question

Post 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
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: pui.shiftElements() question

Post 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?
Stuart
Profound User
Posts: 30
Joined: Tue Apr 17, 2012 4:37 pm
First Name: Stuart
Last Name: Leonard
Company Name: Summit Holdings
Phone: 813-665-6060
Address 1: 2310 Commerce Point Drive
City: Lakeland
State / Province: Florida
Zip / Postal Code: 33594
Country: United States
Contact:

Re: pui.shiftElements() question

Post 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).
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests