GetPanelEventRect

LabWindows/CVI 2017 Help

Edition Date: May 2017

Part Number: 370051AG-01

»View Product Info

DOWNLOAD (Windows Only)
LabWindows/CVI 2010 Help
LabWindows/CVI 2012 Help
LabWindows/CVI 2013 Help
LabWindows/CVI 2015 Help
LabWindows/CVI 2017 Help

int GetPanelEventRect (int eventData2, Rect *rectangle);

Purpose

Obtains the current size and position of a panel that is being sized or moved. Call this function when you receive an EVENT_PANEL_SIZING or EVENT_PANEL_MOVING event in a panel callback.

You can use this function, along with the SetPanelEventRect function, to restrict a panel from being sized or moved beyond the limits you set.

This function returns the panel bounds that includes the titlebar and frame. GetPanelAttribute and SetPanelAttribute with ATTR_TOP, ATTR_LEFT, ATTR_HEIGHT, and ATTR_WIDTH refer to the panel bounds not including the titlebar and frame. Use the panel attributes ATTR_TITLEBAR_ACTUAL_THICKNESS, ATTR_FRAME_ACTUAL_WIDTH, and ATTR_FRAME_ACTUAL_HEIGHT to go from one bounding rectangle to the other.

Parameters

Input
Name Type Description
eventData2 int The value of the panel callback's eventData2 parameter.
Output
Name Type Description
rectangle Rect Rect structure specifying the location and size of the panel.

The Rect structure is defined as follows:

typedef struct
   {
   int top;
   int left;
   int height;
   int width;
   } Rect;

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 8.1 and later

Examples

Refer to the following examples that use the GetPanelEventRect function:

  • userint\events.cws

    Open example
  • userint\activex\WebBrowser.cws

    Open example

WAS THIS ARTICLE HELPFUL?

Not Helpful