Jump to content

Code In User Controls?


Recommended Posts

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?

Link to comment

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.

Link to comment
  • 1 month later...
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

Link to comment

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.