Jump to content

Scrollbar's slider width changes as I acquire data


Recommended Posts

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

Link to comment

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.

Link to comment

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.

Screen Shot 2018-11-07 at 1.00.56 AM.png

Link to comment
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.