LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Scale child panel view port

Hi,

I have created a child panel which no title bar in a parent panel, and also created a canvas control in the child panel. The canvas width is larger than the child panel's width, so I want to view the whole canvas by regulating the child panel's horizontal scroll bar, when doing this, I hope to keep the panels view port not change but just move the canvas to left. Please provide an idea. Thanks.



David
0 Kudos
Message 1 of 2
(2,995 Views)
David,

If you have multiple controls in a child panel, but you want to scroll only one of those controls (the canvas) when the user scrolls the panel, your best solution is to place the control that you want to scroll in its own panel (a grand-child panel, if you will). You can size this panel to be exactly the height of the control, place a horizontal scroll bar on the panel, and hide the panel's frame and titlebar. Then, when you load this panel as a child of your other panel, it will look like a canvas with a scrollbar, which sounds like what you want.

I'm attaching a .uir file with a panel like the one I described (it's in 7.x format. Let me know if your version of CVI is older than that, and I will save it in an older format)

Luis
NI
0 Kudos
Message 2 of 2
(2,977 Views)