Generating events from a control inside an array of clusters

Hi, I have a question regarding UI events. I would like to capture a mouse down event generated in a string control inside of an array. Each element of the array is a cluster that has a Boolean control, a numeric control and a string control. When I try to add an event to handle the mouse down the only option available in the event structure is the one available for the entire array. If this is not possible to map event from the individual controls inside of the each cluster that are part of the array, could you provide with an alternate way of "knowing" when the string control is selected. The application has a touch screen without a keyboard and mouse. I need to display the touch screen graphic keyboard when the textbox is selected.
Thanks,
Diego F.

I'm not sure, but I think your only option may be to do some calculations. The mouse down on the array will give the coordinates of the click in VI coords. You can get the coords and size of the cluster and the coords and size of the string using their property nodes. Then, you have to calculate whether the click was on one of the visible strings using addition, subtraction and quotients. Once you make a subVI out of this, it should be easy to use.
You should watch out for the index display and the label, as they change the values of the coords. I'm sorry, I can't think of any easier way to do this.
Correction - I just thought of one. If you use the KeyFocus property on the string inside the mouse down event, it seems to work. I'm not sure whether this will work when bringing the keyboard to the front, which is why I left the other suggestion in place. Here's my test (7.0)
Try to take over the world!
Attachments:
key1.vi ‏29 KB

Similar Messages

  • How can I set the caption text of picture controls inside an array or how can I choose which array element is assigned using the array elements caption text property.

    I have 8 picture controls inside an array and I would like to set the caption text of these controls.
    I have used the property node of the array and used the array elements property caption text to set the text.
    The problem is however that I set the same text to all the picture controls inside the array.
    My question is how to set caption text of specific elements (Picture control) that I have so far only been able to access using the array elements caption text property.

    Some more help
    1 You could use the caption of the array and place it in front of the selected picture and update that using property nodes.
    2 Like Norbett said if you use a cluster of pictures then their caption can be updated individually.
    Here is a an example that demonstrates the above
    David
    Attachments:
    Modify the Captions Of Pictures.vi ‏83 KB

  • Creating a dynamic event from a control reference

    Does anyone have an example of creating a dynamically driven  event from a control reference?

    Hi 4BoysDad,
    There is a good example that can achieve what you're looking for in the example finder.  It is called "Dynamically Register For Events.vi".  It will be under
    <labview>\examples\general\dynamicevents.llb\Dynamically Register for Events.vi
    Regards,
    Che T.
    Applications Engineer
    National Instruments

  • Events from C# Control ? Urgent !!

    Hi all,
        Is there any way to handle events from a C# customcontrol in ABAP?
        When I used ActiveX controls, it was easy - just check by EventID in DISPATCH, and RAISE EVENT that would then be handled...
        But now, with C# controls, events are "delegate" functions, and I just can't figure out how to make ABAP subscribe to this tricky kind of event...
        Please, help!!!
    Thanks,
    Arnaldo.

    This article will explain how to declare and use the C# events in your application as Event Control. You can design your event control in couple of mints, making your event as control will be easy for GUI developers to implement events in client side.
    Here are the steps:
    Create one Windows Application Project
    Add “Component Class” using "Add New Item". This is going to be your Event Control.
    Declare your delegate in your Event Control under your namespace
    Now declare your event inside your Event Control class.
    Also add the FireTheEvent method to fire the event.
    Build the project.
    Go to Form, then ToolBox, add the Event Control using “Add/Remove Items” menu by right clicking on the tool box.
    Drag and drop the new control. Using the property window of the control you can easily implement the Event method in your application.
    Call The FireTheEvent method in your button click after adding new button to your form.
    Run the application and click on your button, you should see your Event firing.
    Here's a list of all the events for the DataGrid control:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsDataGridEventsTopic.asp.
    After referring to the DataGrid Event Handler (http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolsdatagriditemeventhandlerclasstopic.asp) information, I think you'll want your code to look something like this:
    <%@ Page Language="C#" AutoEventWireup="True" %>
    <%@ Import Namespace="System.Data" %>
    <script language="C#" runat="server">
    void Page_Load(Object sender, EventArgs e)
    // Set things up...
    void Item_Data_Bound(Object sender, DataGridItemEventArgs e)
    // Your event code
    </script>

  • How to generate event on other control within one event

    Hello
    I am using event structure.
    When program is inside the event case of one control, I want to trigger the �mouse down� event on another control at that time (without operating that another control),
    so that next time, another control�s event is called.
    I have many controls and hence thrir event cases , after which I want to trigger a specific event case corresponding to a button control.
    (I wish to keep the contents of button2 case inside the event only)
    In attached example:
    When user clicks �button 1� or �button 3�, event must be generated so that contents of �button 2� event are executed when program comes there next time
    Thanks
    Attachments:
    Trigger_Other_Event.vi ‏35 KB

    Sorry, I just noticed that you only use LabVIEW 6.1 where signaling properties are missing.
    Here is a simple solution for LabVIEW 6.1:
    - set all buttons to latch.
    - set all button events to "value changed"
    - merge the timeout event with event 2
    In event cases 1 and 3 set timeout to zero, in all other cases to -1 (no timeout).
    See attached example. I placed a 500ms wait.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Trigger_Other_EventMOD.vi ‏31 KB

  • How I Generate Event from ADF to talk BPEL

    Hi ,
    I want to generate Event in ADF on click of button.
    That Event suppose to send message to BPEL process.
    Can anyone suggest me on this?
    Thanks,
    Ramit

    You would need to use Mediator component in the SOA composite to listen to this event generated from the ADF layer.
    The Mediator can route to the BPEL component where you could do the required processing.
    ADF Developer's guide has all the required information with respect to this:
    http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcentities.htm#CHDHDIDB
    Thanks,
    Navaneeth

  • How to update enum labels when enum is inside an array of clusters?

    Hello LabVIEW gurus,
    I'm stuck with a design aspect, and was wondering if you could share some ideas as to how to get past it: I would like to fill a table with strings, and then populate an enum inside an array with the string values. 
    For purposes of discussion I'll break the steps into two actions, where one takes place before the second (sequential, not in parallel)
    Action one - The user will be first asked to populate a table with "strings". The table would look like,
    row0 - "string0"
    row1 - "string1"
    row2 - "string2"
    and so on....
    Action two - When ever the user "selects action two" I would like to populate an ENUM inside a cluster with values from "Action one". In other words, I'm trying to dynamically write enum values.
    The cluster has several objects such as boolean controls, string controls, AND AN ENUM control (see attached .png)
    I have tried using Ring, and enums at this point, and have not been successful at it. I read somewhere that because the enum/ring is inside a cluster, and the cluster inside an array, that what I'm trying to do is simply not possible. If that's the case, can you please throw ideas my ideas my way? :-)
    In advance, thank you very much.
    Cheers,
     

    Is this in the full development environment?  Is the cluster (that I assume is a type def) reserved for running at the time?  Because what you described is totally do able IF you are not in an EXE, and this is intended for making an enum to be used elsewhere.  Otherwise this won't work the way you want.  An enum must have it's type defined at run time.  Through scripting you can make the cluster or the enum, or edit ones that already exists (or use one as a template) but as soon as you are in an EXE you have no scripting, and even if you did your code can't compile, so you can't use the new controls even if you could make them.
    But if you are looking for a way for a user to enter strings into a table, and then update a drop down with those options that is possible using the combo box which keeps track of the string selected, or a ring control which keeps track of the index (or value) associated with the selected item.
    You gave lots of information, but not the important bits like how this will be used.

  • Change properties of controls in an array of clusters

    Hello,
    my latest problem:
    i display larga amount of data using arrays of clusters.
    the user has to be able to inserst clusters in between, therefore the array solution seems perfect.
    However, for each cluster, once a sub-control is defined, i would like some other sub-controls to either become invisible, visible, change ring values...etc.
    i could not find any way to do it whatsoever. anybody has an idea?
    ... And here's where I keep assorted lengths of wires...

    Hey good work!
    I sounds like you are on the right track, so here are a couple more things to throw into the mix. First, remember that given a reference to a "top-level" cluster you can extract references to all the controls inside it on the fly. For example, you take a cluster reference, it has a property called "Controls" this is an array of of references to all the controls inside that cluster. If each of those references is itself a cluster, you can in turn get references to all the controls inside them. Hence you don't really need references to each individual control on the front panel. In fact, all you have to do is figure out how to update one of the inner clusters and then put that code inside a loop so it executes once for each reference in the top-level cluster's Controls property array.
    Second, think about how you can generalize the operation such that the you can turn them into subVIs that you can use no matter what the structure of the clusters might be... The information is all there in the control properties.
    Finaly, yes I can post an example. I'll put one together this evening and try to get it up online.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Colorbox control in an array of clusters

    hi, im working on labview 6. i have an array of clusters. the cluster has eight elements. one of them is a colorbox control. I want this colorbox control to have only 4 colors i.e, the user has a choice of only 4 colors if he clicks on the colorbox control. can ihave such a control?

    Hi Pavitra,
    Use labview Help to guide you.
    Or else,
    A new picture ring control or text and picture  ring control has one item with an empty picture display. You must copy a picture to the clipboard before you can import the picture  into a ring control. LabVIEW can import all graphic files your graphics software supports.
    Complete the following steps to import pics  into ring controls.
    Copy a picture to the clipboard.
    Right-click the ring control or text and picture ring control and select Import picture from the shortcut menu.
    Copy another Pictureto the clipboard.
    Right-click the ring control or text and picture ring control and select Import picture Before or Import picture After from the shortcut menu.
    Use the Operating tool to click the picture box to view all imported pictures
    regards
    Dev

  • Update a slider insider an array of clusters

    I have an array of clusters. Each clusters has several controls, one of
    which is a slider. I want to change the scale of the slider
    dynamically, since I have one slider per variable in my system. I'm
    using a for loop to access each cluster in the array and update the
    scale of the slider to match the range of the variable. But when doing
    this, the scales in all the sliders are updated at once, thus all
    sliders end up having the range of the last variable.
    Is there a way to avoid this automatic update of all the elements in an array?

    In the unlikely chance that your array size is fixed you could work with a cluster of clusters
    You can then use the Controls[] property to access the individual maximum and scales property nodes.
    Incidently I had seen this before http://forums.ni.com/ni/board/message?board.id=170&message.id=170076&query.id=49401#M170076. There are some tips on how to get around the array to cluster limitations. They might apply to you.
    David
    Message Edited by David Crawford on 06-21-2006 07:53 AM
    Message Edited by David Crawford on 06-21-2006 07:53 AM
    Attachments:
    Cluster Of 5.jpg ‏31 KB

  • Generating Event with Subvi Control on Main Vi

    We are creating a code in which on pressing set up button( present on main vi front panel ) we are calling one subvi as pop up window which further contains some boolean controls and every boolean control has further one subvi associated with it, when we press on that button a window comes that has several numeric and string control, what we want is after entering all values on numeric and string control and after pressing ok button, these val;ues should get updated to the sequence list present on main vi front panel, i have tried to do this using queue but what we want is that on pressing ok button( present inside subvi) we need to generate a event on main vi that it should dequeue elements to the list only when that ok button is pressed, i have tried to do it using value signalling property node but this is not working, i am not getting how to do this or there if there is any other better way to do this
    I have attached the code for reference.
    Attachments:
    Automation.lvproj ‏9 KB

    A better way to do this would be to enqueue the state that the event case is calling from the instrument state.  Then you don't have to poll the global variable and worry about signaling the event.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    queue up state.PNG ‏9 KB

  • Drag and drop data from Numeric Control or Numeric Array to excel file

    I have two inquirries about drag and drop:
    1. How to drag and drop data from a Numeric Array or Numeric control to excel file
    2. How to drag and drop data from a Numeric Array or Numeric control to an Numeric array Indicator?
    The item 2, I tried it with the event structure, but it didnt work.
    Please do reply.
    mytestautomation.com
    ...unleashed the power, explore and share ideas on power supply testing
    nissanskyline.org
    ...your alternative nissan skyline information site

    There are very good drag and drop examples that ship with LabVIEW.  Have you looked these over to see if they can be modified for your needs?
    Matthew Fitzsimons
    Certified LabVIEW Architect
    LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison

  • It seems that NI dropped the Activex Events from the Control Panel in LabVIEW 7.0. Why???

    I have Labview 6.0/6.1 Activex vi's that no longer work in LabView 7.0 There are no longer ActiveX Events vi's in the Communications->ActiveX control set. What is the deal with that??? Pretty much makes my $2400 upgrade investment worth nothing as far as I can see.

    kup,
    Are you sure that your VIs no longer work? They should. The support VIs are located in "vi.lib\Platform\ax-events.llb". The functionality was not taken away, the VIs were simply removed from the function palette. Also, ActiveX Events may now also be handled using calback VIs. This is much better, IMO. Seach the examples for "ActiveX" and "callback".
    -Jim

  • How to generate event from a JTree node

    I plan to move a vector list to a JTree and then make it possible to launch an even by double clicking a node in the tree, how can i quicly achieve that cuz i have being trying to overcome that since...any assistance?
    Thanks

    Since TreeNodes are no Components you have to add a MouseListener to your JTree and use the JTree.getPathForLocation(int x, int y) method to get the TreePath. something like this should work for you:
    tree.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    if (e.getClickCount != 2) return
    JTree tree = (JTree)e.getSource();
    TreePath path = tree.getPathForLocation(e.getX(), e.getY());
    TreeNode node = (TreeNode)path.getLastPathComponent();
    Do whatever you want here
    Hope that helps, Mathias

  • Differences between Robot class generated events and real input events

    Hello everyone!
    I'm having a problem with the translation of the description of the awt.Robot class.
    - "This class is used to generate native system input events" -
    Does this mean there is no difference between real input events and generated events from the Robot class? Difference in reference to that the generated events can't be recognized as generated events by the os or programs.
    Thanks in advance.
    Chris B.

    The Robot class will use an interface provided by the operating system to inject events. Those are very close to 'real' input events, but not quite there. There are, for instance, several games out there which have a protection mechanism against Robot's events to prevent scripting/botting. However, any application that is not paying special attention to the event's source will assume that the input events generated by Robot are actually coming from the user, so you can 'control' any application with the exception of the beforementioned games.

Maybe you are looking for

  • Mac Pro - Keeps crashing more frequently

    Hi All, I wonder if anyone can help as I keep having issues with my Mac Pro crashing more and more frequently. Its an early 2008 model 2 x 2.8ghz, 10gb ram, Nvidia 8800 GT512 card.  Im on mountain lion which is up to date. I'm a photographer and when

  • How to add a new field to an existing Generic Search result list?

    Good day, I'm new to the concepts of the Generic Search Framework.  I'm attempting to add a new field to an existing result list, and have that new field restricted to a value of "C".  This new field will not be displayed, it is only used to ensure t

  • How do I create a smaller (iPod-sized) copy of library?

    I'd like to create a much smaller copy of my iTunes library, one that will fit on my iPod. I've been using Apple Lossless encoding for all my CD ripping to maintain high sound fidelity, but it's now over 100GB and growing. Is there a way to create a

  • JDBC Sender Issue

    I have a select statement that I am trying to run, and the statement will run on a DB2 terminal or thing perfectly, but when i try to run it in XI I get this error: The JDBC driver returned the following error message: 'com.ibm.db2.jcc.b.SqlException

  • Custom node not appearing in hbox

    I can insert this custom node into an hbox (I scanned the hbox and verified their existence), but the contents of the frame from the fxz file do not show up. My objective: -I have a series of fxz files (frames) that I wish to put into an hbox -Each f