LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

horizontal scroll of single line string

Bart,
 
I guess I don't understand why you can't use the text.scrollpos in LV 8.0.1.  I could build the VI from scratch just using LV 8.  It is a property of the string control listed under Text >> Scroll Position.  This is available in my copy of LabVIEW 8, does that property not appear in your copy of 8.0.1?
Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 11 of 17
(1,298 Views)

Brian,

His issue is not that he doesn't have text.scrollpos, but that it doesn't work the way he wants.  He has limit to single line, and word wrap disabled.  He has horizontal scrollbar visible.  On the front panel, he can slide the scrollbar left and right to show different portions of the string control.  He wants to programmatically control the scrollbar, but the text.scrollpos property does not do this.

If it is set up for multiple lines and word wrap enabled, the property does work to change the vertical scrollbar.

0 Kudos
Message 12 of 17
(1,286 Views)
Hi:
Ravens Fan got it right.  I do have the property available to me in 8.0.1, but it does not do horizontal there, only vertical.  I haven't had the time yet to try a round trip from 8.0.1 to 8.2 and back to see if this will still work for me.  Maybe next week.
Bart

0 Kudos
Message 13 of 17
(1,274 Views)

I don't think it will work for you.  I've been running version 8.2 and experimenting with different word wrap, limit single line, and scrollbar visibility setttings.  I haven't found a way to do it in LV 8.2.

-Bill

Message Edited by Ravens Fan on 06-07-2007 09:41 PM

0 Kudos
Message 14 of 17
(1,271 Views)
Hi Ravens Fan:
I hope you are wrong.  The version that smercurio wrote in 8.2 works just fine, although the scrolling is a bit coarse.  The version that coal man supplied was in LV 8, and it still worked.  I haven't had the time yet to try the conversion of my particular string and see if mine will survive the conversions, but it does look promising.  I am guessing that the functionality is supposed to be there in 8.0.1, but that the compiler needs a reminder it somehow gets from the downgraded version worked on in 8.2.  Anyway, I will give my version a try next week, if I have the time.  We are trying to ship by Friday.
Bart

0 Kudos
Message 15 of 17
(1,265 Views)

Smerurio's work around is pretty good.  What he did was set the control to do word wrapping.  You are seeing a single line of a multi-line word wrapped string.  So when the text.scroll position property changes, it is essentially just doing a vertical scrolling from line 1 to line 2 to line 3.  That's why it seems a little coarse.

What is really needed is a text.hscroll position property for the horizontal scroll bar position.  But it just doesn't exist.

0 Kudos
Message 16 of 17
(1,260 Views)
Well, there never was a requirement that said word wrap needed to be off. That was an assumption that was made by Ravens. There also was no requirement about it doing a "smooth scroll". My initial response was that I tried an example and based on the original question I was able to do what the poster wanted, but I did not post the example. After the responses of "no, that's impossible", I decided to post the example to counter the argument that "it was impossible", and let the poster take a look at the example and see if that's what they were looking for or if it was an acceptable implementation. True, it is "technically" not a horizontal scroll, as it only simulates one, but if it does what the user wants, that's what matters.

Should there be an equivalent "horizontal scroll"? Perhaps. If one believes so then the best thing to do is to submit a feature request.
0 Kudos
Message 17 of 17
(1,244 Views)