I have an application that uses a panel control (which has a certain number of String controls and text controls). In order to be able to scroll down the panel, I have used the stand alone scroll bar that comes with the LabWindows development suite at C:\Program Files\National Instruments\CVI71\toolslib\custctrl - scroll.fp, scroll.c, scroll.h.
Basically I have a data list and I populate the controls on the panel from the data list. As I scroll up/down etc, the data in the list is accordingly copied to the panels. (Note: Most cases the number of panel controls is less than the number of data points in the list)
Everything seems to be working fine except being able to set the position of the "thumb" within the scroll bar. I need to control the position of the thumb because I am also attaching keyboard events - Page Up, Page Down etc to do the exact operations that can be done using the scroll bar events - Page up, Page Down, Up, Down, Thumb change. Also, when I am trying to perform scroll down (page down, down key etc) and the last portion of the data list is being displayed, I want my thumb to position itself at the end - ATTR_SB_DOC_MAX or 100?? Similarly, when I am scrolling up and I have reached the top of the data list, I want the thumb to position it at the very top. I tried using the following in my code when I reach the first portion of my list case:
ScrollBar_SetAttribute (parameter_panel_handle,
scroll_bar_handle,
ATTR_SB_VALUE,
0 );
But the thumb gets set at the top for a short time and soon moves back to what the user positioned it to.
I am not sure if I am being clear in my question but I'll give it a try and some angel will answer my question 🙂
Thank you!