Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 2 > Newsgroup comp.lang.labview

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-08-2008, 02:10 PM
WilliamLee
Guest
 
Posts: n/a
Default Creating custom control

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
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-08-2008, 02:10 PM
Ben
Guest
 
Posts: n/a
Default Re: Creating custom control

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
Reply With Quote
  #3 (permalink)  
Old 07-09-2008, 02:10 PM
WilliamLee
Guest
 
Posts: n/a
Default Re: Creating custom control

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
Reply With Quote
  #4 (permalink)  
Old 07-09-2008, 03:40 PM
Eli_S
Guest
 
Posts: n/a
Default Re: Creating custom control

Hi, Additionally, please take a look at <a href="http://zone.ni.com/devzone/cda/tut/p/id/3198" target="_blank">this</a> DeveloperZone article, it is pretty comprehensive and it should be very helpful.
Reply With Quote
  #5 (permalink)  
Old 07-09-2008, 04:40 PM
F. Schubert
Guest
 
Posts: n/a
Default Re: Creating custom control

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
Reply With Quote
  #6 (permalink)  
Old 07-10-2008, 02:40 PM
WilliamLee
Guest
 
Posts: n/a
Default Re: Creating custom control

I started working on a simple example for a XControl.&nbsp; What is method of controlling the output of an XControl?&nbsp; I've created a simple XControl with a slider and string.&nbsp; The code syncs the two contents together (slider numeric is converted into a string).&nbsp; 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.&nbsp;
&nbsp;
Thanks
&nbsp;
Will
&nbsp;
Reply With Quote
  #7 (permalink)  
Old 07-14-2008, 07:10 PM
Eli_S
Guest
 
Posts: n/a
Default Re: Creating custom control

Can you post the code you have so I can take a look at it?
Reply With Quote
  #8 (permalink)  
Old 07-21-2008, 08:10 PM
WilliamLee
Guest
 
Posts: n/a
Default Re: Creating custom control

Sorry for the delay.&nbsp; It's a busy time right now.
Here is an example code.&nbsp; I've set up a string and a slider to be syncronized.&nbsp; 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
&nbsp;
&nbsp;
&nbsp;


xctrl_example.zip:
http://forums.ni.com/attachments/ni/...rl_example.zip
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


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



All times are GMT. The time now is 01:05 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.