EasyTab_SetBounds

int EasyTab_SetBounds (int panel, int tabControl, int whichBounds, Rect bounds);

Purpose

This function sets the size and location of a Tab control.

Parameters

Input
Name Type Description
panel integer The specifier for a particular panel that is currently in memory.

This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
tabControl integer The ID returned by the EasyTab_Create or EasyTab_ConvertFromCanvas function.
whichBounds integer Specifies whether to set the size and position in terms of

  • the interior panel area, excluding the tabs and frame, or
  • the entire control, including the tabs and the frame.

If VAL_EASY_TAB_INTERIOR_BOUNDS is specified, the size and position of the panel area of the tab control is set to the specific rectangle, and the tabs and frame are positioned along the edge of this area.

If VAL_EASY_TAB_EXTERIOR_BOUNDS is specified, the size and position of the tab control's exterior bounding rectangle are set, and the interior panel area is adjusted to make room for the tabs and the frame.
bounds Rect The Rect structure that specifies the location and size of the Tab control.

The Rect structure is defined as follows:

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


Hint: : You can create a Rect without having to declare a variable by using the following function:

Rect MakeRect (int top, int left, int height, int width);


Example:

EasyTab_SetBounds (panelHandle, tabCtrl, VAL_EASY_TAB_EXTERIOR_BOUNDS,
MakeRect(20,30,150,200));

Return Value

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

The possible negative error codes are:
Return Values: 0   Success
–1 to –999 A User Interface Library error code. (Constants are available in userint.h.)
–5000 to –5499 A Toolbox instrument driver error code. (Constants are available in toolbox.h.)

A description of any of these error codes can be obtained using the GetGeneralErrorString function in the toolbox.fp instrument driver.