chigaitakanoha Posted November 6, 2018 Report Share Posted November 6, 2018 Hi I wrote a live acquisition vi to acquire data from the camera to display the buffer index on the scroll bar, but it seems to act strangely. I expected the scroll bar's slider size to be 1/(max size), but it starts from 1. As an example, when the first frame arrives then the scroll bar's slider size is equal to the UI element's width. When the 2nd frame arrives then the scroll bar's slider size becomes the half of the UI element's width. Similarly when the 3rd frame arrives then the scroll bar's slider size becomes the 1/3rd of the UI element's width and this continues... Please see the video in the following link: https://yoshidad-gmail.tinytake.com/sf/MzA2MTc5MF85MTc2NTc2 Please see attached VI as a reference. Thank you! 1106_ni_request.7z Quote Link to comment
MikaelH Posted November 7, 2018 Report Share Posted November 7, 2018 It's hard to test that VI since it requires a camera (and one VI s missing). But I haven't had any issues with the Scroll bar (at least when you figured out how the property node option works). If you can make some test code it will be easier to help you. Quote Link to comment
chigaitakanoha Posted November 7, 2018 Author Report Share Posted November 7, 2018 Hi Mikael, Thanks for taking a look. Does my explanation make sense to you ? I don't know why the width of the slider changes as new data arrives. For the slider I set the minimum to be 0 and maximum to be the BufferSize and x to be the index that gets updated from the callback. I don't understand why it behaves like this in the video. Quote Link to comment
Michael Aivaliotis Posted November 7, 2018 Report Share Posted November 7, 2018 The scrollbar is behaving as it should. I suggest you create property nodes for the scrollbar and investigate the help on those. When you create a brand new scrollbar it sets the DocMax and DocMin to 10 and 0 respectively. It uses that as a reference if you don't set them yourself. So when the data fed to the scrollbar exceeds 10 then LabVIEW automatically adjusts the scrollbar slider width to handle the visualization of the larger data. LabVIEW also takes into consideration the actual width of the scrollbar as well. So if you stretch it out then the slider will resize larger accordingly. If you wanted to make the slider wider, then you need to set the PageSize property to be a certain fraction of DocMax. Since the default is probably 1, which will make the slider super-thin. Quote Link to comment
chigaitakanoha Posted November 22, 2018 Author Report Share Posted November 22, 2018 I thought I had replied - thank you Michael! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.