It's nice that when I don't lock a panel in place I can move it at run-time. But when I click the submit button and the panel is redisplayed, it goes back to its original position. How can I have it retain its position?
I tried binding the window TOP and LEFT to variables, but when I set them, the contents don't appear within the window, and the variables aren't returning the current position values when the submit button is pressed.
--Bryan
Retain panel position
-
- Profound User
- Posts: 72
- Joined: Fri Oct 01, 2010 5:07 pm
- First Name: Bryan
- Last Name: Leaman
- Company Name: InVue Security
- Phone: 704-752-6513 x221
- Address 1: 15015 Lancaster Hwy
- City: Charlotte
- State / Province: North Carolina
- Zip / Postal Code: 28277
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Retain panel position
You're on the right track with top and left.
However, I think you have bound the wrong top and left properties to the RPG fields. You've probably done this on the panel widget, causing it to be shifted relative to ths screen, causing the content to appear outside the panel.
What you want to do is instead bind to the "window top" and "window left" properties which are at the record format level.
Using these will correctly cause the entire record format (panel, fields, and all) to be offset using the values fed in through RPG.
This will allow you to control where the window appears correctly, but unfortunatley it still won't "stick" where the user moved it because the "window top" and "window left" properties are not updated and sent back to RPG. So, your program will send the old values back, causing the window to go back to it's original position.
We do plan to make these fields update and submit back to RPG in a future release. This would allow the window to "stick" properly.
I would recommend setting up the binding as described -- that way when the update is available your windows will start working the way you want them to.
However, I think you have bound the wrong top and left properties to the RPG fields. You've probably done this on the panel widget, causing it to be shifted relative to ths screen, causing the content to appear outside the panel.
What you want to do is instead bind to the "window top" and "window left" properties which are at the record format level.
Using these will correctly cause the entire record format (panel, fields, and all) to be offset using the values fed in through RPG.
This will allow you to control where the window appears correctly, but unfortunatley it still won't "stick" where the user moved it because the "window top" and "window left" properties are not updated and sent back to RPG. So, your program will send the old values back, causing the window to go back to it's original position.
We do plan to make these fields update and submit back to RPG in a future release. This would allow the window to "stick" properly.
I would recommend setting up the binding as described -- that way when the update is available your windows will start working the way you want them to.
-
- Profound User
- Posts: 72
- Joined: Fri Oct 01, 2010 5:07 pm
- First Name: Bryan
- Last Name: Leaman
- Company Name: InVue Security
- Phone: 704-752-6513 x221
- Address 1: 15015 Lancaster Hwy
- City: Charlotte
- State / Province: North Carolina
- Zip / Postal Code: 28277
- Contact:
Re: Retain panel position
Thanks for the info.
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: Retain panel position
Some good news... in our upcoming update, the "window top" and "window left" values will be sent back to the appropriate RPG variables when you move the window.
Who is online
Users browsing this forum: No registered users and 3 guests