Keyboard "tab" control in Array of Clusters

I'm trying to polish some of my LabVIEW user interfaces so that my users can work faster in them and so that they follow more "Windows UI Standards" (or whatever).
I have an array of clusters.  The cluster has 3 numerics.
When a user "focusses" on the first numeric within a cluster and hits the tab key, it moves the focus to the second numeric.  Hit tab again, and it jumps to the 3rd numeric.  Hit the tab key a 3rd time and it jumps back to the first numeric in the cluster.  What I want to happen is for the focus to move to the first numeric in the next element of the array.
I've started to play around with the "Key Down" event case that has a conditional looking for "TAB" and then checks the "FindCtrlWithKeyFocus" with the last numeric.  My probes within this event show that the "TAB" key detection is working, but the "FindCtrlWithKeyFocus" never has a TRUE output from the "CtrlFound?" output of the Invoke Node.
Even if I did know if tab was pressed in the last element, I'm not real sure how to move focus to the first numeric within the next cluster element of the array.
A numeric array behaves in the correct way.  I could get the program working the way I want with a 2d array of numerics.  However, each numeric has different data entry parameters and there is also a lost of "self documentation".  I would like to find a solution because this has come up with other, more complex, array of clusters that would not be solveable with a 2d array of a base type.
Seems overly complicated to me.
Bonus Question: The default value of my numerics is 0.  When my user clicks a numeric the cursor is on either side of the 0 and the user has to delete the 0 prior to their data input.  When a numeric is entered via the Tab key, the whole field is selected.  When the whole field is selected, whatever the user inputs will replace the original "0" that was in the field.  Anyway to have the whole field selected when the user uses the mouse?
Sorry for the wall-of-text post (and the preposition hell).  Thanks for your input.
Solved!
Go to Solution.

Well I've gone and gotten the tabbing behavior you're looking for.
-the key is to set "skip when tabbing" on the controls inside the clusters to true, and leave it false for the array elements.  Now when keyfocus is on one of the cluster controls and Tab is pressed, LV will put the keyfocus on the next visible array element.
-then use a "key down?" filtering event to check and see if any of those controls have keyfocus when Tab is pressed.  If so, and it's not the last control in the cluster, discard the keypress and programmatically advance keyfocus to the next item.  
-Finally if the Tab press was not discarded, use a normal "key down" UI event to check if one of the array elements now has keyfocus and if so, set KF to the first control in its array.
So in short, this setup turns off tabbing along a row so that every tab will move to the next row.  Then it filters out Tab if it's not yet at the end of the row.  Finally, it automatically puts the cursor in the first column when the row has advanced.
One significant drawback is that it only tabs between visible array elements.  You can probably make it auto scroll.
I'll leave it as an exercise for the reader to handle the shift+Tab (reverse tabbing) key presses.
To me, this runs up against three holes in LV UI programming:
1) Array Element events should be available.     The Array:Key Down event only handles key presses when the array has keyfocus, not when things inside it do.  Any kind of key filtering has to be done at the VI level (!!!).
    The data source for these events should include the element index (eg what cell was clicked on?)
2) There aren't effective ways in VI server to deal with individual array elements.  I recognize that some of it is the basis that array elements have the same properties, but there are display and selection properties that do differ between cells.  I ought to be able to specify that a particular cell index has keyfocus.  Arrays, why can't you be more like Tables?
3)Tab order should be flat, not hierarchical.
edit: in case the snippet messes things up, file is attached.
-Barrett
CLD
Attachments:
Tab through cluster array elements.vi ‏28 KB

Similar Messages

  • Array of clusters TAB next element

    I have an array of clusters and I want with the TAB key, when I am at the last element of the cluster i, move to the first element of the cluster i+1.
    Jean-Marc
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Attachments:
    Array of clusters.jpg ‏132 KB

    Thanks for they answers.
    My problem is the triple TAB (TAB -TAB -TAB) to change the array line  i to i+1.  
    Click on an element in the array and move with the TAB key.  When you  are at the element "VOC":
    - the first TAB (event "<VOC>:Key Down?" ) generate CTRL +UP (return to tabbing among front panel controls -return to CLUSTER at line i);
    - the second TAB (event "<Cluster>:Key Down?" - sequence through the array- move to the array line i to line i+1)
    - the third TAB (event "<Cluster>:Key Down?" )generate CTRL + DOWN ( move the key focus inside the array or cluster -move inside the cluster at the line 1+1);
    I try to reduce the number of TAB.
    Jean-Marc
    "Complete the following steps to
    use the <Tab> key to move through elements within a single array
    or cluster when you run a VI.
    Display the front panel. While the VI is running, press the <Tab> key until the array or cluster is highlighted.
    Press the <Ctrl> key and the down arrow key to move the key focus inside the array or cluster. (Mac OS) Press the <Command> key. (Linux) Press the <Alt> key.
    Press the <Tab> key to sequence through the array or cluster elements and the array indexes.
    To return to tabbing among front panel controls, press the <Ctrl> key and the up arrow key. (Mac OS) Press the <Command> key. (Linux) Press the <Alt> key."
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Attachments:
    Tab Array Clusters LV8_0.vi ‏94 KB

  • Event Structure's value change, not detecting changes when tabbing thru array of clusters

    Hi!  I have an array of clusters (int, int, string, int) control, and want to detecting changes made to the it.  I used the Event Structure's value change case on the array, it works excellent except that it'll only detect the changes when you click out of the element or press the enter key (the one by the numbers, not carriage return).  I want it to detect the changes when I tab thru the cluster or array too, but I can't figure it out... Does anyone have any ideas?
    Thanks!

    mfitzsimons wrote:
    altenbach
    Tried Value Change with my example done in 7.1 and it doesn't trgger an event.  That is why I suggested Mouse Down.
    Curious. I did a few minor edits in 8.0 before saving as 7.1, but the simple value change event got triggered just fine when the value vas terminated with a tab in 7.1. Every time.  Strange....
    Are you on 7.1 or 7.1.1? Maybe there's a difference (I am using 7.1.1).
    LabVIEW Champion . Do more with less code and in less time .

  • Use tab to advance through array of clusters?

    I have a control which is an array of clusters.  Is there any way to have the tab key advance through elements in the cluster, then proceed to the next array element at the end of the cluster?

    It's a wacky workaround but you could try using an event handler to capture the tab key and then programmatically tab through each element.  This forum post has a GREAT example posted on the second to last post that does exactly what you are looking for.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=380344&requireLogin=False 
    David_L | Certified LabVIEW Architect
    LabVIEW Tools Network | LabVIEW Tools Network Developer Center

  • Control mouseover image does not display when contained in an array of clusters.

    I have been using system booleans (with some customization) for the ability to impement mouseover animations.  For example (default system booleans):
    The mouseover feedback works well with my UI, and for the most part everything is going great.
    However, the mouseover image does not load if the the boolean is contained within an array of clusters (a single cluster with the boolean inside or an array of booleans works as expected):
    The mouseover animation does work for a single array element in the above case (the one which was most recently clicked), but this behavior isn't desirable and it seems buggy if I were to leave this on my UI as it is.
    So I guess I'm just wondering if anybody has encountered this or has any suggested workarounds?  The few that I've thought of so far (maintain a separate array for any set of system boolean controls, check coordinates myself on mouse move event and try to update the proper element in the array, avoid using mouseover animations entirely for this set of controls) aren't all that desirable.  Even though this issue could be considered cosmetic, the UI is very important to me as this code is something shipped to customers.
    This is LV 2011 by the way, so if by some chance the behavior in 2012 is correct please let me know (this alone might be reason enough to convert the project up).  If there is a CAR ID for this behavior and an NI employee wishes to share it I would also appreciate that.
    Best Regards,  
    John Passiak
    Solved!
    Go to Solution.

    Hey Jason,
    A reproducing VI would be any VI that contains an array of clusters with a system control boolean inside.  Here's an example:
    Single Boolean, Single Cluster, and Array of Booleans all show the proper mouseover image.
    Array of Clusters always shows the mouseover effect on the last element which was clicked, but does not show the mouseover effect on other array elements (actually, it seems to be inconsistent--every now and then it does show the mouseover effect on other array elements but it is not at all reliable).
    Best Regards,
    John Passiak
    Attachments:
    MouseoverTester.vi ‏9 KB

  • How to change the tabbing order of an array of clusters?

    How to change the tabbing order of an array of clusters?  I have the cluster arranged in table in the front panel.   The cluster element goes horizontal and array element goes vertically.   When I press the tab key, the cursor goes to the next array element instead of the next cluster item (down instead across).
    Solved!
    Go to Solution.

    Broken Arrow wrote:
    Harold asked a perfectly reasonable and necessary question, but how is that a Solution ???
    I believe it is called the Socratic Method.
    Sea-Story time
    I had the privledge of working for Ron Davis when he managed the Allegheny District of DEC. He was an ex-WO4 (Highest possilbe rank for non-commisioned officer in US Navy, required act of congress to confirm).
    Ron never answered any question I ever saw presented to him. I remember a group of managers in a frenzy over some issue  running to him to to see what he thought. He asked them a series of questions that lead them to the solution and soon they were smiling and slapping each other on the back as they walked away.
    Who is that has a signature that read "it is the questions that guide us"?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • 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

  • Control labels in an array of clusters

    Here is something that keeps coming up and now I have time to see if I can find a solution.  I often have an Array of Clusters of some sort in my LabVIEW programs.  They are super convenient, but one annoyance I have is that the labels have to be in each element of the array or have no labels at all.  Is there a way to have the labels only appear in the first element and then hidden for all other elements in the Array?  This would save a lot on front panel real estate.
    The best I have been able to come up with is turning off the labels all together and adding labels above the Array control.

    Ravens Fan wrote:
    I don't think you can change free labels.  But you could add the labels as being other elements of your cluster, using classic string controls and color them transparent.  Arrange the new strings so that they look like labels for your other cluster elements.
    How does it help solve the problem? I'm not sure if I've got the problem right. So please correct me if I'm wrong. So, the problem here is that labels come in all the elements of the array of clusters, like here:
    What I'm I think you're suggesting Raven, is to add some more labels into the cluster, like in the next pic, I have unchecked the label of numeric control "test 01" and added a free label instead.
    What I understood from the OP is that the cluster labels should be visible only in the first element and not in the rest. I think that would look kind of unbalanced. However a work around would be add free labels outside the cluster, by customizing the array. Or just adding free labels on the front panel and grouping it along with the array like this:
    So, am I barking up the wrong tree?
    Message Edited by NitinD on 30-08-2009 10:07 AM

  • Two instances of quirky behavior: array size of empty array and tab control freeze

    LV 7.1
    Array size of empty array. Adding empty arrays to an array of higher dimension produces a fantom array of non-zero size.
    Tab control freeze. An event structure with checked 'lock front panel until the event case completes' option permanently freezes the front panel in certain special circumstances.
    Zador

    tst wrote:
     Tell me if you still think this makes sense.
    Whew, let me look at this tonight after I activate the 4D module in my brain.
    (I think it makes sense, though ) Generally I look at the product of the dimensions array to determine if an array is empty. You can initialize a multidimensional array with some dimensions at zero and it is reproduced nicely in the array size output. Also the "Empty array" tool correctly identifies it as empty, even if some dimensions are nonzero.
    Message Edited by altenbach on 03-15-200612:42 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    init.png ‏3 KB

  • Array of Tab Control page names

    Hi,
    I wish to programatically create an array of the names of the pages within a Tab Control.
    See the attached VI for my attempt at this.
    It works, but as it runs it changes which page is displayed on the front panel.
    Is there a way to do this without changing the page displayed on the front panel?
    Cheers,
    Dan
    Dan
    CLD
    Solved!
    Go to Solution.
    Attachments:
    array of tab control page names.vi ‏9 KB

    Hi,
    Take a look at the attachment.
    Hope it helps,
    Paulo
    Attachments:
    array of tab control page names2.vi ‏10 KB

  • No 'Keyboard' tab on boot camp control panel - MBP Jun 2009 + Windows 7100

    I've been trying for 2 weeks now to get the function keys to work on my MBP (bought Jun 2009) using Windows 7 Build 7100.
    This is the 3 ghz MBP with 256gig ssd. Boot camp partitoned fine, windows 7 installed ok, and boot camp ran fine as well. I even downloaded the 2.1 boot camp update and reinstalled the drivers.
    The thing is no matter what i do, the keyboard function keys dont work. And i've noticed that the Keyboard tab does not appear on the Boot Camp control panel. The dvd eject button doesnt work either, the sound not working, and also the trackpad is a bit jumpy.
    I've researched a lot already for this problem, and it seems people do get Windows 7 to work find on a MBP (even with Vista drivers) so i'm not sure what i'm doing wrong. Any help would be much appreciated.
    The machine itself by the way is incredibly quick under Windows 7. Everything is pretty much instant. What a pleasure:)

    I've solved the problem.
    The Boot Camp Support Software I orginally ran was downloaded straight from the Apple website so I thought it must be ok, but just to be sure I went back into OS X and downloaded it through the Boot Camp Assistant, switched back to Windows, installed it and everything game out fine! There must have been something Apple put into the software through Boot Camp but not their own site. All the tabs were there, the volume/brightness buttons worked etc.

  • Displaying child clusters in a tab control

    I have a data structure comprising of 2 clusters, each cluster has 4 sub clusters. I also have 2 tab controls, one for each parent cluster. I want to display the contents of each sub cluster on its own tab page.
    My thoughts so far have gone towards placing a cluster in each tab page and copying or linking each sub cluster into them, but this seems very inefficient. If anybody has a suggestion on how best to approach this, I would appreciate it.
    Ed
    - Cheers, Ed

    I believe I want something like this. My sub clusters are displayed on their own tabs, and in the block diagram they have been made members of the parent clusters for ease of sending them to sub VIs.
    The updating of the display clusters seems slightly long winded, and given this application is going to be fairly large I'm sure there must be a better way of implementing this. If anybody has some ideas or suggestions I would be grateful.
    cheers, Ed
    - Cheers, Ed
    Attachments:
    clusters.vi ‏31 KB

  • Keyboard Navigation with Tab Control

    We have a tab control in a form and it has several pages.
    On one of the tabs we show data from a multi row block, the first 3 columns are on the tab canvas, then we have a stacked canvas that scrolls left/right that shows the rest of the data. We fix the first three columns as they give context to the rest of the rwo that is scrolled within the tacked region.
    Now the problem:
    When focus is on one of the columns displayed on the tab page we can press CTRL-TAB and the tab switches to the next tab page.
    If focus is on one of the fields on the stacked canvas CTRL-TAB doesn't navigate to the next tab page - it attempts to switch windows.
    It looks like the items that aren't onthe tab canvas, but are on the stacked canvas, aren't party to the CTRL-TAB event?
    Has anyone else experienved this problem? Or know of a work around?
    Regards,
    Bren

    When I use CTRL-TAB just the trigger key-next-item fires. In our environment we use CTRL-PageUp/Down to switch the tab canvas. But I think the event that is really fired is key-nxtblk. So on forms-level I added the triggers key-nxtblk/prvblk that call my procedure next-/previous-tab-page.
    In the when-new-forms-instance trigger I initiate a plsql-table, that has the following record type as a rowtype:
    TYPE TabPage_Rec IS RECORD
    (TabPage Varchar2(80),
    First_item Varchar2(80));
    So each tab page 'knows' its predecessor and successor. I then implemented two procedures next_tab_page and previous_tab_page, that iterate the plsql-table and set the canvas_property TOPMOST_TAB_PAGE to the requested value and navigate to the first item on the tab page.
    That way you are mostly independent of the way your form is designed (blocks, items, order in object navigator). It is a bit of an investment and you have to keep it consistent to the way your form changes tabwise, but I found it quite handy.
    Hope this helps.
    Regards,
    Bettina

  • Using Event Structures with Array of Clusters

    Using LabVIEW 8.5
    Hi all,
    I'm trying to convert an existing application to one that can be used
    through a touch screen. I updated the UI and added an event structure
    to listen for mouse ups on controls that require a HMI keyboard or
    numpad to show up. Although I've been programming for a while, I'm new
    to LabVIEW and am struggling with a problem:
    Is there any way to have an event case listen to an event within
    arrays? I've seen a few examples on the forums, but they all start with
    breaking up the arrays into individual variables. Using the variables,
    they build arrays. This seems pretty tedious, and I'm pretty sure I
    can't apply it to one of my arrays. Essentially, I just want to know
    which cluster in which array the user has clicked on, so I can open the
    HMI keyboard or numpad and send the text to that cluster. In my watered down app (Array of Clusters.vi), I've put 3 arrays of clusters and a few stand-alone controls to give you guys an idea of what I'm taking about.
    BTW, I'm using the HMI Keyboard and Numpad built by the Beta Community (http://decibel.ni.com/content/docs/DOC-1062) and modified it to add a "Clear" button to the keyboard and numpad. Please let me know if I implemented this in the best way.
    Thanks for the help,
    Kunal
    Message Edited by bhatiak on 08-04-2008 03:55 PM
    Attachments:
    Array of Clusters4.llb ‏274 KB

    My old tic tac toe example shows how to determine which square of a 2D array has been clicked.
    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=247044#M247044
    You probably can adapt some of it for the arrays on the right. If the array can be scrolled, you also need to account for the "indexvals" offset.
    The Layers controls is easiest, because you only show one element. Just read the "index vals" property to get the array element and parse the coordinates to get the cluster element.
    btw: the small while loop on the right serves no purpose at all and acts just as a CPU burner. You can delete it without any change in functionality. Is there anything else to it?
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for