LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to move ctrls?

Solved!
Go to solution

I wish to move an existing control an offset number of pixels down. I know I can destroy the control and then re-introduce it to the panel at its new location, and I have seen the movectrl.fp example, but this is a much simpler task than that, I don't want to over-complicate things. What ctrl attribute can I tweak to make it move an offset?

 

Thanks in advance!

 

0 Kudos
Message 1 of 2
(3,085 Views)
Solution
Accepted by topic author TurboMetrologist

You can do it this way:

 

GetCtrlAttribute (..., ..., ATTR_TOP, &top);

SetCtrlAttribute (.., ..., ATTR_TOP, top + offset);

 

Moving horizontally is done the same way by means of ATTR_LEFT attribute.

Remember that pixel coordinates start from the upper left corner and go downwards / rightwards



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 2
(3,075 Views)