LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delphi type scrollbar

Hi All,

I am trying to find a way to implement a simple (Delphi type) horizontal scrollbar in LabVIEW (7.0 for Win2k).

The LabVIEW normal controls seem to be lacking in a few areas. I need a scrollbar with arrows on either end that can be used to increment/decrement the position a fixed amount, and also when the user clicks on the scrollbar the position increments a *different* amount (instead of moving the slide to the position the user clicked).

I suppose I can use the increment/decrement buttons on the "Horizontal Pointer slide" digital display to obtain the finer adjustment (+/- 0.1) , but I am not sure how to obtain coarser adjustment (+/- 1) by clicking on the slide (and still retaining the ability to drag the slider at will).

Without making a custom control (which I have virtually zero experience with), can anyone think of a nifty way to achieve this?

thanks in advance
Neil
0 Kudos
Message 1 of 5
(2,900 Views)
If you're using windows, a possible (though relatively inconvenient to use) approach would be to use an ActiveX control.
Microsoft's flat scrollbar, for example, has settings for how much it changes when you click an empty space and how much when you click the button.
The main disadvantage to this is that to use it, you will need to use a property node each time you want to read the scrollbar's value (and that it's windows specific).

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(2,897 Views)
thanks tst,

I really want to stay away from ActiveX, as in the near-ish future I will probably need my apps to run under both Win and Linux.

any other suggestions?
0 Kudos
Message 3 of 5
(2,891 Views)
You can change the allowed range for the numeric using property nodes, so clicking outside the allowed range will take the numeric to the extreme. Then, you change the range again, and so on.
You may need to consider what happens if a user doesn't release the mouse button.

___________________
Try to take over the world!
0 Kudos
Message 4 of 5
(2,886 Views)
BTW, customizing a control like this is fairly simple (there is documentation in the LV user manual) and if you take a slide with buttons on both sides you don't even need to use the digital display's buttons.
You can also make it look much more "scrollbar-like" by replacing the images with shapes from LV's palettes.

___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(2,881 Views)