LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

moving a botton

Solved!
Go to solution

Hi,

 

Does anyone know a quick way to move a botton or graph to another tab or panel?

 

I'm modigying the appearance and realize that I want a bunch of them in another tab or panel, many of them are used in the code or have a callback function.

 

Thank you guys.

0 Kudos
Message 1 of 4
(3,531 Views)

At design time:

  • Select the control
  • Ctrl+C - Ctrl+V to copy and paste
  • Customize as you want

At run-time:

  • DuplicateCtrl
  • InstallCtrlCallback to add/remove the control callback function
  • SetCtrlAttribute to customize its appearance/settings


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 4
(3,528 Views)

The issue is when I copy the botton or anything else, still there are lines in the code that get attributes from numeric boxes llike before from previous panel.

 

Is there any fast way or should I change the code manually?

0 Kudos
Message 3 of 4
(3,508 Views)
Solution
Accepted by topic author Hamed_47

Copying a control from one panel to the other does not alter the existing code. A callbackdata installed on the control will remain on the new control. You must manually remove the callback fromt the control, or modify it with a new one specific for the new control.

CVI has no means to detect whether a callback connected to a control can or cannot exist on the new control copied: it is legitimate that more controls share the same callback routine, even on different panels. It's up to the programmer to define which callback, if any, must be attached to every control he puts on the user interface.



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?
Message 4 of 4
(3,504 Views)