LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 05/30/2006

Here's a short nugget for a short week (Monday was the Memorial Day holiday in the US).  If you're typing text in a string control, you can press Shift-Enter to toggle the scrollbar on the string control.  If it's the first time you pressed Shift-Enter while typing in the string constant, the constant will resize to display all the contained text.  Try it out!
-D

P.S. - Check out past nuggets here.
Message 1 of 9
(9,528 Views)
Is this LabVIEW version specific, because I know this is not the behavior in 7.1, and have never seen this behavior. At least on my machine, anyway. Shift-Enter - the Enter on the alphabetic side of the keyboard - gets you a new line in the string control. This is the same as if you had just hit Enter (again on the alphabetic side of the keyboard). If you hit the Enter on the numeric side of the keyboard that indicates end of entry. No change in behavior whether the scrollbar is visible or not.
0 Kudos
Message 2 of 9
(9,496 Views)

I just tried this in 7.0, 7.1, and 8.0 and it worked just fine.  I did notice that it only works with the Enter key on the alpha side of the keyboard...the Enter key on the numeric keypad just commits the text entry (as expected). 

Ah, one other thing I just tried.  This trick does not work if you have "Tools > Options > Environment > End text entry with Enter key" selected.  (The path to that option in 7.x is "Tools > Options > Front Panel").  Do you have that setting enabled?

-D

0 Kudos
Message 3 of 9
(9,487 Views)
Nope, don't have that option checked, and it's the first thing I looked at after trying out your tip. Just doesn't work for me. Beats me. Smiley Sad
0 Kudos
Message 4 of 9
(9,483 Views)

Weird...only two other things I can think of...is your keyboard or OS set up for some non-English configuration?  If so, maybe there's some weird key mapping going on.  The other thing I can think of is to delete your LabVIEW INI file (back it up first) and restart LabVIEW and see if the trick works...if so, there's some other weird INI setting I don't know about that is killing our buzz.

-D

0 Kudos
Message 5 of 9
(9,475 Views)
While I can speak a little Italian (with a name like Saverio Mercurio, how can I not? Smiley Happy) I have my keyboard and OS set up in the Senate-desired official language of the US of English. Or is that American? Standard QWERTY-keyboard, too.

I did try to delete my LabVIEW.ini file just to see if that would make a difference, but it didn't.

Oh well. I'm not going to lose any sleep over it. Nice tip regardless.
0 Kudos
Message 6 of 9
(9,471 Views)
Darren,

Shift-Return works on Mac on the diagram constant. On a control Shift-Return puts a line feed constant \n in the text. Shift-Enter terminates entry on both the diagram and the control. On Mac keyboard the key on the alpha part of the keyboard is Return and on the numeric part it is Enter. The "End text entry with Enter" is not checked.

If the Height of the control or constant is less than about four lines of text (60 pixels of control outline) the scroll bar shows as a gray shadowed area without a scrolling button and the scrolling does not work. Is this a bug? It would seem better to not display anything in the scrollbar area than to suggest that a scrollbar exists but does not work.

Lynn
0 Kudos
Message 7 of 9
(9,442 Views)
A-ha! It's the string constant, not the string control. I was using the string control on the front panel, since that's when Darren had indicated in his post. Now that I re-read it, he mentions the string control the first two times, but the string constant the last time. I confirmed it does work that way for the string constant, but not the string control. Now this makes sense - I thought I was losing my mind with regards to the behavior of the string control since I had never seen that behavior with the string control. Good catch!
Message 8 of 9
(9,437 Views)

Argh!  Yes, this nugget pertains to string *constants*, not string controls.  Sorry about that.

Let's chalk this one up to too much sun this weekend.

-D

0 Kudos
Message 9 of 9
(9,428 Views)