ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a reference to a specific scrollbar

I am able to use a property node in order to get a list of references to all objects on a pane, and then I am able to cast the reference to a scrollbar to find which references are scrollbars. But once I have a reference to the scrollbar, I have been unable to find a property that would tell me if I have a horizontal or vertical scrollbar reference. Is there any property that exists, or something that would help me distinguish them?

 

Just realized the all objects property on a pane doesn't give me a the scrollbars. So my question now becomes, how do I get a reference to a pane's scrollbar, and how do I tell which direction it is (horizontal/vertical)?

 

Thanks!

0 Kudos
Message 1 of 5
(2,538 Views)

I get the references to the scrollbars using the objects property node, not sure why you aren't...

 

FireFist-Redhawk_0-1597347899951.png

 

Redhawk

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 2 of 5
(2,491 Views)

@GregFreeman wrote:

I am able to use a property node in order to get a list of references to all objects on a pane, and then I am able to cast the reference to a scrollbar to find which references are scrollbars. But once I have a reference to the scrollbar, I have been unable to find a property that would tell me if I have a horizontal or vertical scrollbar reference. Is there any property that exists, or something that would help me distinguish them?

 

Just realized the all objects property on a pane doesn't give me a the scrollbars. So my question now becomes, how do I get a reference to a pane's scrollbar, and how do I tell which direction it is (horizontal/vertical)?

 

Thanks!


The event VI Scroll gives you an "AppRef" Refnum. There is an extensive amount of choices within that menu, but I don't think what you are looking for is in there. This may be another case where you need to roll your own scroll bars.

 

Snip.png

 

mcduff

0 Kudos
Message 3 of 5
(2,466 Views)

If what you want is references to the two scrollbars that are part of the pane's window, I don't believe that is possible. As far as how to determine if a scrollbar is vertical or horizontal, use the Bounds property and compare the height and width. Unless something really weird is going on, a vertical scrollbar will have height >> width and vice versa for a horizontal scrollbar.

Redhawk

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 4 of 5
(2,460 Views)

Yeah I was trying to get the built in scrollbars but I think I may actually not need them for the problem I was trying to solve. Would be good to know though either way

0 Kudos
Message 5 of 5
(2,377 Views)