LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

scroll bars for a part of a panel

Hello,

I have a panel with a canvas. The canavs can be larger than the screen, so I added scrollbars to move to the region of interest. Now I want a potion of the panel to be visible even when the canvas has moved. So I thaught I make the canvas e.g. not as high as the panel and addd some scrollbars to it. But I have not found an option/setting for doing this.

Is there a solution known?

Michael
0 Kudos
Message 1 of 4
(3,252 Views)
Michael,

You cannot put scrollbars on a canvas, so the canvas cannot be scrolled independently of its parent panel. But you still have a workaround. All you have to do is put the canvas on a child panel, and this child panel can have the scrollbars. You can size the child panel so that the canvas fits snuggly inside it. You can also hide its frame and titlebar so that no one can tell that it even exists.

Let me know if this is unclear. I can probably zip up a little demo.

Luis
NI
0 Kudos
Message 2 of 4
(3,243 Views)
Thank you Luis, I understand you and will try out.

Michael
0 Kudos
Message 3 of 4
(3,241 Views)
Hello Michael,

Also, the following KnowledgeBase demonstrates how to implement Luis' suggestion and an example UIR showing how to add scrollbars to your canvas.

Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 4
(3,234 Views)