Admin Production ni-theme
Current Publication

SetPanelSize

LabWindows/CVI

SetPanelSize

int SetPanelSize (int panelHandle, int height, int width);

Purpose

Sets the height and width of the panel. The top and left edges of the panel remain constant.

Although you can change the height or width independently using SetPanelAttribute, you must use SetPanelSize if you want to change both the height and width of a panel for which you have enabled the ATTR_SCALE_CONTENTS_ON_RESIZE attribute. When you change the height and width in one call, SetPanelSize scales and redraws the panel only once.

To change the position of a panel, call SetPanelPos.

Parameters

Input
Name Type Description
panelHandle int Specifier for a particular panel that is currently in memory. You can obtain this handle from functions such as LoadPanel and NewPanel.
height int New height of the panel in pixels, excluding the panel frame and title bar.

Valid Values: 0 to 32,767.
width int New width of the panel in pixels, excluding the panel frame.

Valid Values: 0 to 32,767.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later

Example

Refer to apps\uirview\uirview.cws for an example of using the SetPanelSize function.