|
|||
|
Hi everyone,
Is there a way to create a custom control with multiple controls and include the programming code together? I've done a search and looked a creating a new control. However, you can't create a custom control with multiple elements together (e.g., I need three combo boxes together) without using a cluster. Once I put them on a cluster, the control can be included in my projects but I can't access the code normally (i.e., ctrl-E). It would be really convenient to create custom controls with the internal logic in a drag-and-drag piece. BTW, how would you interface with this type of control since Vi's only have one set of inputs and outputs. Would I have to control it (i.e., call multiple functions/methods using a flag)? Thanks for your help since Labview is still new to me. Thank Will |
|
|
||||
|
||||
|
|
|
|||
|
Search the LabVIEW help for "XControl". It is really not intended for use be noob's but if you pound at it hard enough, and don't give up, you'll learn a lot along the way.
Otherwise you may want to look for the radio buttons. :smileywink: Ben |
|
|||
|
A co-worker showed me a very simple method of simulating a control using a Sub Panel connected to a VI. This allows the VI to be used
The most significant drawback is the fact that each VI can only be used once, unlike XControls it would appear. However, since we only need one control and this method simplifies the code, we'll probably use this method. I'm still investigating the XControl -- which is exactly what I was originally looking for -- for future applications. Thanks everyone. Will |
|
|||
|
Hi Will, it is possible to make your code reusable if you put all your manipulating code (property nodes, event handling) into a SubVi and wire a control reference for each control of that kind to this SubVi. If I find some time, I'll try to code and post an simple example of that.Felix
|
|
|||
|
I started working on a simple example for a XControl. What is method of controlling the output of an XControl? I've created a simple XControl with a slider and string. The code syncs the two contents together (slider numeric is converted into a string). I've tried connect the slider output to both data out and display state out (a cluster with one numeric) but the output always remains zero.
Thanks Will |
|
|||
|
Sorry for the delay. It's a busy time right now.
Here is an example code. I've set up a string and a slider to be syncronized. I would also like to be able to read the value of the slider, and in the future a specified cluster from the control. Thanks for your help Will xctrl_example.zip: http://forums.ni.com/attachments/ni/...rl_example.zip |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: EXCEL libname engine update existing sheet. | Gerhard Hellriegel | Newsgroup comp.soft-sys.sas | 0 | 04-02-2009 02:00 PM |