From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

programmtically edit a control in CVI 6.0

Hello ,

using movectrl.fp , I can move or zoom a control easily . Along with this idea , how to
emulate such an edit mode :

if a control is selected (e.g., click it) , it can be around with a box have the same
shape , just like we edit a control in the cvi user panel . Thanks.

David
0 Kudos
Message 1 of 5
(2,782 Views)
David,

Probably the best way to do this will be to use a decoration that you make visible when the user clicks on that specific control.Take a look at the code attrached for an example, also you may want to use the FOCUS to determine whether to show the box or not.

Let me know if this helps,

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 5
(2,782 Views)
Hi Juan ,

Thank you for your reply . but how to make the four little black boxes distributed at the acme ? I want to emulate an edit procedure . Thanks .

David
0 Kudos
Message 3 of 5
(2,782 Views)
I see two options here, use another 4 decorations to place the squares in the corner and make then visible and invisible as you need. Another option that you may want to explore is to create an image that has the rectangle with the corners and show and hide this image in the back of the controls.

Take a look at the file attached, I think the decorations may give you a better result since the image will be resized, but it's up to you.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 4 of 5
(2,782 Views)
Hi Juan ,

Thank you very much !

David
0 Kudos
Message 5 of 5
(2,782 Views)