LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

maximum pane size???

Hi!

 

A have a lot of problems, because I can't set maximum pane size? Here is an example of it. I have image control that is bigger than screen resolution, so I have to enable vertical and horizontal scrollbars, but then user can scroll into "infinity"and I don't want that, because I have other controls that user must not see. I know that I can achive that with Scrollbar control, but it will be much easier if you could set maximum pane size and place other controls out of this area, so that user can not see them. It is also anoing if you scroll into blank area of the pane, so it will be great if I can limit this scrolling area. If I use Scrollbar control then I have to resize them too when window size is changed. Does anybody know better way to achive that?

 

Thanks,

andrej

0 Kudos
Message 1 of 6
(3,418 Views)
May be you could use the image controls scrollbars instead of the VI's ? and fit the control size to the window pane (right click -> fit control to pane) ?
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 6
(3,394 Views)
If you are displaying the panel scrollbars at run-time, then I don't know of any way to limit how far the panel can be scrolled. Using scrollbar controls would be best if you are interested in limiting the scrolling area. If you are interested in hiding controls on the front panel, you can always right-click on the control/indicator on the block diagram and choose the option of Hide Control.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 6
(3,393 Views)

Hi Adnan,

 

I'm believe that guys are right when they say that there is no way to just set the limits you will be able to scroll in. Maybe if you didn't use upper recommendation, you can keep reading rectangle displayed by your front panel pane (Content Area Rect or Origin property), and you can compare actual values with maximum values. This solution is far not so elegant as it is the one with Image Control Scrolbars, however it offers you some flexibility more since it is not related just to Image Control.

 

Regards,

Martin

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 4 of 6
(3,362 Views)

Just an idea I have not thought out completely....

 

How about dropping your own sliders customized to look like the window scroll bars? When the change value, adjust window view, move scroll bars to new location ....

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(3,357 Views)

Hi Ben,

 

I wanted to use them first, but oun sliders would cause more difficulties if you wanted to use scroll button.

 

On other hand, you would be able to control the possition nicer by event structure. For example on Lava in "Mouse Wheel Scroll Event, Find way to capture scroll event" article you can find simple example how to generate events on mouse scroll. This event could be greatly use to check current possition, check limits and calculate new possition. I believe this approach could work with little of programming Smiley Tongue

 

 

Regards,

Martin

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 6 of 6
(3,342 Views)