String control KeyFocus

My Focus don't get off my string control. When I let it loose focus the VI goes on. I attached my VI.
Attachments:
ScanBC-RCK-left.vi ‏677 KB

Here you go
Nitzz: He uses a bar code scanner, since it sends \n I guess.Like this one 
Regards,
Even
Certified LabVIEW Associate Developer
Automated Test Developer
Topro AS
Norway
Attachments:
Example.vi ‏16 KB

Similar Messages

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • Is there a way to force the cursor into a string control when a vi is called

    In a .vi I'm wrighting I need to input a new serail number at the beginning of each run. Is there a way to force the cursor into the string control box every time the start screen returns? eliminating the need for the operator to move the mouse around and click.
    I would like to THANK all that have replied to my questions in the past. It has been a big help!
    Thanks
    TeBlues

    ah, problem solved.  what a community.
    Message Edited by Space_Flight on 11-20-2006 10:08 AM
    Attachments:
    keyfocus.jpg ‏83 KB

  • On-Screen Keyboard and a String Control

    I am experiencing some odd behavior when I use the On-Screen keyboard (OSK) and a string control.
    I am developing a application that will need to use the OSK to enter in some data on a touch screen monitor with no physical keyboard. I have a Event-Driven State Machine set up to the Key Down event when a word/characters are entered and the user presses the Enter Key on the OSK. I noticed if I probe the VKey wire wuen I press the Enter Key on the OSK, it comes across as a Return press. No big deal I thought, just see if the Return Key is pressed and continue on.
    When I went to test my program, I noticed that my values were displaying as if nothing was entered. Digging a little further, I noticed that my original data is still there if I press the Backspace Key and remove the Return command. Probing the string wire within the string control indicates that that the value comes back as a empty string in my string control even though my entire string is physically still there. I can press the backspace key (deleting the carriage return) and see my original text. What I think is happening is when I press the Return Key on the OSK, it inserts something and moves my text either up or down and when I use the property node to extract the data within the string control, I get a empty string.
    How have you gotten around this? I'd like to hear your solutions.
    Solved!
    Go to Solution.

    Since you marked Jarle's message as the solution, I hope it means your happy and he's helped you solve your problem.
    I had never seen the OSK app before.  It looks like it can be very useful, but these other issues like how to programmatically get into it, or out of it with a task kill seem like they are a bit of a hack to work with something that shows so much promise.
    If these issues are too big, consider making your home pop-up keyboard as a LabVIEW VI.  It would be a little bit of work, but not so bad.  I've made a pop-up numeric keyboard that I've used in a few apps of mine.  Of course that is fewer keys to layout and deal with.  And I didn't need decimals for what I was doing so I didn't have to program that which adds a little complication.
    A pop-up keyboard might actually be easier, other than having 3-4 times the number of keys depending on how many symbols you need to deal with, and if you need to deal with CAPS, or CAPS lock or whatever.
    There is also a chance that someone may have done something already.  A google search might find something.  It is likely in the NI community if it exists.  If you can find something that works or is close to what you want, it might be better than using this OSK executable.
    Just some ideas to toss out there.

  • How to save data in a string control?

    I want to save data in a string control or indicator. I know that I can rt-click and make the data default. But can it be done through a proberty node or something else when the program is running?

    There isn't a "Make Current Value Default" method that you can invoke programmatically, this would require your VI to be saved when it was closed, which obviously couldn't be done if it had been built into an executable.
    You could read the values from the controls/indicators and save them in a .ini file using the Configuration File VIs on the File I/O palette, and have some code at the start of your program that reads the values from the file and puts them into the objects using local variables.

  • I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    I would like to do a program that have one string control and one string indicator, any character that I type in the string control in the same time it will be appear in another string (indicator). How can help me?

    Why not use an event
    Add a While Loop, inside the loop add the Event Sructure.
    Now in the event structure selecd the String Controls.value change event to
    react
    and the new value inside the event that you get,( connect to the String
    indicator box.
    On Sun, 10 Aug 2003 15:58:47 -0500 (CDT), WiltonFilho wrote:
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    > I would like to do a program that have one string control and one
    > string indicator, any character that I type in the string control in
    > the same time it will be appear in another string (indicator). How can
    > help me?
    >
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

  • How to restrict the copy & paste in string control?

    In my application user name & password string controls are there.After typing the username in string control it is copied and paste it in password string control .
    I like to restrict the string copy from one string control  & paste it into another string control ?
    How to do this?
    Kumar.
    Attachments:
    login.vi ‏11 KB

    These images illustrate anoth approach to inhibit the copying of text which is available in LV 8.2 (maybe 8.0)
    Ben
    Message Edited by Ben on 12-07-2006 10:12 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Edit_RT_Shortcut.JPG ‏60 KB
    Short_cut_Menu_edit.JPG ‏30 KB

  • String control not displaying special characters

    In Microsoft Word, I can display special ASCII characters such as ASCII 29 'GS' by using the keypad and holding the alt key while typing the ASCII numerical equivalent alt+029. I want to enter these characters into a string from a string control but I can't figure out if that is possible or if so, what settings to use.

    Hello,
    CVI only uses certain character sets and fonts because at the time that CVI was created, unicode did not exist.  You will have to choose the correct font and character set for the string control that will provide access to the character you are searching for.  For example, if you wanted the character produced from holding ALT + 29 (↔), you could set the string control's character set and font to "symbol".  Pressing ALT + 174 in CVI will then display the ↔ character.
    Regards,
    Shawn S. | NIC
    Instrument Driver/IVI PSE
    National Instruments

  • Enter text in other languages in String Control

    Hi,
    Is it possible to type text in other languages(chinese, japanese,hindi,etc...) in Labview 8.2. 
    In runtime I want to enter the text in String control.
    Regards,
    Raja 

    Please go through this and also see this thread from where i got this link.

  • Barcode reader input to string control

    Hi, 
    I am using a barcode reader that uses keyboard emulation.  The barcode types on the computer the same way a keyboard would.  When I open notepad and use the barcode reader to read a barcode, the following meesage is typed: 
    S/N: 17967
    Lin: 0.591%
    Ph: 1.32deg
    In that exact format.  However, when I try use the reader in labview with a string control the format changes.  The following meassages are printed instead: 
    S/N: 17967mn: 0.591%m: 1.32deg
    S/N: 17967mn: 0.591%mn: 1.32deg
    S/N: 17967mnLin: 0.591%mPh: 1.32deg
    S/N: 17967mn: 0.591%m:1.32deg
    So the format changes.  Sometimes the Lin and Ph are printed other times they are not, spacing in the string changes, and in all cases the carriage return is no longer there.  
    Could you please let me know what might be causing this.  Ideally I would like the message to be read in the same format it is in notepad.  My code is attached. 
    Thanks
    Attachments:
    barcodereader.vi ‏16 KB

    Is there a reason you have a timeout event?  You are not doing anything in there.  So I would remove the timeout (you can just remove the timeout input or set it to -1).
    I'm just thinking that if you set the focus while the scanner is doing its thing is causing the issue you are seeing.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I keep a listbox on top of a string control?

    I would like to keep the listbox "on top" or "in front" of the string control.  Whenever I click in the string control, though, the listbox moves behind it.  I have set the order from the menu, but that seems to get overridden.
    Attachments:
    String-Listbox.vi ‏13 KB

    LOL
    That was just to pull the wool over somebody's eyes...
    Check the control editor of the string you will know the truth
    (Anyway thanks for the stars )
    Message Edited by Vsh on 04-08-2008 07:54 AM

  • When and How to get the Text.ScrollPos value of a String control when scroll bar position changed

    Hi, 
    I'm working on a feature triggered by scroll bar position of a string control changed.
    But I could not find a good way to catch the scroll bar position changed event, 
    the scroll bar is controlled manually by mouse down → mouse move → mouse up, I want the get the Text.ScrollPos value when user mouse up, and compare with the maximum value.
    But the problem is,  mouse up on the scroll bar could not trigger String: Mouse up event!
    So I have to get the Text.ScrollPos continuously in the background in Timeout event, but I think it’s not efficient.
    Do you have any better idea on when to get the correct destination value of Text.ScrollPos?
    I plan to store the value of Text.ScrollPos in the bottom(maximum value) in a shift register, then compare the current Text.ScrollPos value with the max one.
    If it comes close to the bottom(90%~100% of the maximum value), then the close to bottom LED will turn on.
    Attachments:
    scroll bar pos changed.vi ‏15 KB

    Hello Cecilia,
    I don't think there is any build-in event for this.
    One solution would be to create your own user event at the initialisation of you main and launch a thread which is going to be pulling the value of your scrollbar position:
    Then you can build your main as if they were a scrollbar move event.
    And dont forget to close the thread and destroy the event at the end.
    Hope it helps.
    Attachments:
    Scrollbar event.PNG ‏10 KB

  • I want to take a series of hex characters in a string control and produce an HDLC string indicator for example if the data string control is 3F27 then the HDLC string indicator is 7E003F2700B57E

    I want to take a series of hex characters in a string control and produce an HDLC string indicator for example if the data string control is 3F27 then the HDLC string indicator is 7E003F2700B57E

    "thanks for your help "
    Does that mean you figured it out already?
    If not, see this thread for some HDLC related code.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=146859&query.id=3388#M146859
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Allow operator to insert tabs in string control

    I'm trying to allow an operator to insert tabs in a string control with the keyboards tab button. Nothing happens when the tab button is pushed. I tried Skipping the Control in Key Navigation but that didn't work. This is LV 6.1.

    6.1 does not have filter events (where you can discard the tab click), but you can use the event structure with the key down event and if you detect that the tab was clicked you can add a tab to the string programmatically and then use the Key Focus property to set the focus back to the string. I think you might be able to play with the text properties to get the cusor to the end.
    Of course, you can also use another key and simply tell the operators not to click tab, but that would make for an ackward user experience.
    Try to take over the world!

  • How to use string control as terminal window

    Hello All
    I am trying to create a terminal window in my VI and to do this i have a string control and a string indicator.
    I want the user to be able to write a command in the terminal and when hitting enter the control should update, but not before! I would
    like the user to be able to enter multiple commands without having to re-click the control with the mouse, so it has to stay in the
    control window. 
    The output from this string control is input to a invoke node to an external motor controller, which replies with a string input to the string indicator.
    Tried to do some event case, but not quite sure how I am going to detect only the enter command.
    Any ideas how to preceed?
    Thanks
    Regards
    Tommy
    Solved!
    Go to Solution.

    Yeah, in your event structure, look for an event of your string control called "key down"...on the left, there are several parameters coming up (char, vkey etc.) where you can use for example the char to look for char=13 (return).
    look here: http://zone.ni.com/reference/en-XX/help/371361B-01/lvprop/control_key_down/
    good luck
    christian 
    THINK G!! ;-)
    Using LabView 2010 and 2011 on Mac and Win
    Programming in Microsoft Visual C++ (Win), XCode (Mac)

Maybe you are looking for

  • How to create a motion tween?? :S

    Hii I know it is very easy. Right click>create motion tween>drag to where I would like the text/object to move BUT Sometimes it doesn't seem to work when i drag the text. It will work the first time and for the second text on the frame it won't work.

  • Which version DNG do I need?

    Hi there - I have a 5D iii on the way and I know my CS4 and LR 3 won't open the RAW files so how do I fine out which DNG converter I need? Thanks Paula

  • IWeb update does not fix nav bar problem

    The subject says it. Downloaded 2.0.1 with hope, republished and uploaded pages, but nav bar still does not appear. Only black dot. Wish I could revert to previous version.

  • Another user or another operation modified data

    I have a problem in updating document numbering setup in AP invoice Another user or another operation modified data; to continue, open the window again  '' (NNM1) (ODBC -2039)  [Message 131-183] SAP 8.81. PL07 I disabled also all Add-ons , but still

  • TS1398 I have a new ipad 3, it will not let me put in my password for wi-fi

    i have a new ipad 3, i'm unable to put in my password for wi-fi, any suggestions?