PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Asawas on October 21, 2020, 11:56:18 AM

Title: Updating controls on different panels
Post by: Asawas on October 21, 2020, 11:56:18 AM
Hello,


I have Panel1 that has a grid control, if you click on a row it will launch Panel2.
My question is, can I update the rows in Panel1 while changing the row data in Panel2.

Or, while in Panel2 can I update Panel1'Grid1'RowData.

Thank you
Title: Re: Updating controls on different panels
Post by: Jane Raymond on October 21, 2020, 01:29:33 PM
I assume that what is currently happening is that you select a row, Panel2 gets launched and it has focus until you close it, then focus returns to Panel1 where you select another row and Panel2 gets launched again.


What you can do instead is use Concurrent panels, which means both panels and their controls are considered active, so changes to one can affect the other. You would not have to relaunch the second panel every time a different row is selected, but you would have to update its controls. You would have to figure out when/how you would want to initiate the concurrent panel, and be aware that the second panel could be closed at any time by the user.


Here's more info on concurrent panels:


https://manual.pvxplus.com/page/NOMADS%20Graphical%20Application/Program%20Interaction/Concurrent%20Panels/Overview.htm (https://manual.pvxplus.com/page/NOMADS%20Graphical%20Application/Program%20Interaction/Concurrent%20Panels/Overview.htm)




Title: Re: Updating controls on different panels
Post by: Asawas on October 21, 2020, 02:29:24 PM
Thank you for the quick response.

In stead of using concurrent panels, can I close (drop) the first panel via code in my program just before I process the second panel then when I close the second Panel I can relaunch the first one?
Title: Re: Updating controls on different panels
Post by: Jane Raymond on October 21, 2020, 02:40:30 PM
I suppose you could, but it sounded like you wanted to see both panels and update them based on changes to either. When you have concurrent panels, the controls are treated as if they're on the same panel.
Title: Re: Updating controls on different panels
Post by: Asawas on October 21, 2020, 02:43:40 PM
What is the command to add to my program to drop the first Panel just before I PROCESS the second Panel?
Title: Re: Updating controls on different panels
Post by: Mike King on October 21, 2020, 11:34:12 PM
Why drop the panel, you could just issue a PRINT 'Show'(-1) to hide the current window, bring up the new panel, then issue a PRINT 'SHOW'(3) to restore.