Jump to content

Code In User Controls?


Recommended Posts

Posted

I'm doing a custom control in which it would be useful if I could add code. I know we never had this ability before 7, but when the need arose I had a flash back to when I first started to play with Labview 7 and at the time I had a "wow" moment where I thought I could actually do this.

Am I going mad?

Posted

I guess this should be a wish-list item. As fas I'm aware, this is not possible yet. I guess the closest thing would be to create a sub-vi with the code and feed-in a ctrl reference to the control of interest. Would this work for you? What exactly do you want to do with the custom code that can't already be done with conventional methods?

Posted

That's what I've done, but it's irritating. I have to feed in a reference to the picture ring, a reference to a control boolean hidden next to the picture and a reference to the stop button and just launch the thing off to one side.

I wanted an "animated boolean"- static image when false and an animated image when true. Easy enough with a picture ring, but it would have been nice to be able to feed a boolean into a custom control and have a loop in the custom control cycling through the images in the true state.

Always annoying when my memory starts playing tricks.

Posted

Oh, now I know what feature you might have seen. :yes:

This comes back to "playing" with graphics programs. You can now add animated GIF's to your controls. This will do exactly what you want. No special thing you have to do just generate 2 different animated GIF's in your graphics package and then place it in the 2 different states.

  • 1 month later...
Posted
So I guess the ability to add code to custom controls isn't a huge distance away.

Another idea might be to use sub panels for this. Create the control as a subVI with all the code you might feel necessary and allow some sort of communication to the main VI for instance through user registered events or queues. Then whenever you need the control insert it with a simple call into a sub panel control.

Rolf Kalbermatter

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.