LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

RecallPanelState

Hi all,

I have an interface which the values of its controls are related ti a data base. So, when i load this interface, i call the functions which extract data from the data base.

Now, from anodher interface bnd with a button, i need to refrech the value of the first interface which is loaded already.

I saw that there is a function called RecallPanelState (panelHandle, "c:\\main.uir", 0); I want to know if it's the suitable one or i needto recall functions of extraction data from database and put value into the lmain interface as usual with the handel of the interface.

Thanks for replying me.

Best regards

0 Kudos
Message 1 of 6
(3,881 Views)

RecallPanelState works restoring the value of controls starting from a file generated previously with SavePanelState: in your situation you should save the panel state immediately after displaying original vlaues, next call RecallPanelState in the button callback. Keep in mind that the file name to be passed to the functions ISN'T the name of your UIR file: calling SavePanelState with such name will rewrite the file contents!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(3,878 Views)

Hi again,

 

First of all, the function is a counterpart of SavePanelState, it probably will not work with a customized database. Also the answer depends on some details...

 

The function recalls the values of all controls on a panel, it also recalls the following control attributes:

  • Label/value pairs of the list-type controls, and their indices
  • Minimum, maximum, and increment values for numerics
  • List box checkmark state values

In general, however, the function does not restore attribute vales (such as dimmed).

Message 3 of 6
(3,877 Views)

Hi

In fact, i need to reload the interface with new values updated from the database.

So if i did understand good what you said, savePanelState restore the original value however i need to change those values with others refering to the data base.

what can you suggest.

and, in this case, RecallPanelState is usufull or not?

best regards.

0 Kudos
Message 4 of 6
(3,874 Views)

Please read carefully my first post. As far as I can understand the correct procedure should be:

 

  1. LoadPanel
  2. SetCtrlVal with values taken from the database
  3. SavePanelState ("Initial state")
  4. The operator modifies values
  5. To restore initial state: RecallPanelState


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 6
(3,865 Views)

Wolfgang,

Thanks for including the statement: ...the function does not restore attribute vales (such as dimmed).

This is the part that the function does not clearly document.  (kudos)

0 Kudos
Message 6 of 6
(3,175 Views)