From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Scrolling A Panel Under Program Control

Hi,

In my program I've created a panel that contains a table. Since the table is larger than the viewing area (screen height) I added a vertical scrollbar to the panel.

The panel scrolls properly using the mouse but I'd also like to be able to scroll the panel under program control. For example - move the viewing area to the top of the panel if a certain action is performed.

Any thoughts?

Thanks,
George Hodgson
0 Kudos
Message 1 of 3
(2,698 Views)
George,

You can scroll the table programmatically using either the following attributes:

SetCtrlAttribute (panel, table, ATTR_FIRST_ROW_VISIBLE, );
SetCtrlAttribute (panel, table, ATTR_VSCROLL_OFFSET, );

Luis
NI
0 Kudos
Message 2 of 3
(2,693 Views)
Luis,

Thank you kindly! A good case of my not reading through the attribute list
in the documentation properly. As you know, but perhaps others might find of
interest, the attribute ATTR_VSCROLL_OFFSET also works with
SetPanelAttribute.

Best regards,
George Hodgson


"LuisG" <x@no.email> wrote in message news:182496@exchange.ni.com...
> George,<br><br>You can scroll the table programmatically using either the
following attributes:<br><br>SetCtrlAttribute (panel, table,
ATTR_FIRST_ROW_VISIBLE, <row index>);<br>SetCtrlAttribute (panel, table,
ATTR_VSCROLL_OFFSET, <offset in pixels>);<br><br>Luis<br>NI


0 Kudos
Message 3 of 3
(2,685 Views)