HitTest Method (TABCONTROL)


PLBCMP GUI Only, 9.4C

 

The HitTest method determines which tab of a TABCONTROL object is at the specified screen position as specified by x and y input coordinates. The method uses the following format:

 

[label]

{object}.HitTest

[GIVING {return}] USING [*X=]{xcoor}:

 

 

[*Y=]{ycoor}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A TABCONTROL object that is accessed.

return

Optional. A Numeric Variable that returns the one based tab number.

x

Required. A decimal number or Numeric Variable that specifies the horizontal position to test.

y

Required. A decimal number or Numeric Variable that specifies the vertical position to test.

Flags Affected: OVER, ZERO

Note the following:

  1. The coordinates must be provided as client coordinates relative to the TABCONTROL object.

  2. The coordinates specified as input parameters for this method can be determined from the {result} value as returned by a MOUSEDOWN event.

  3. The {return} value is zero when the coordinates are not on a selection tab for the TABCONTROL object. Otherwise, a one based value is returned that identifies the selection tab number.

  4. If the value returned is zero, the ZERO condition flag is set.

  5. The OVER flag is set if the {return} variable is too small and the returned value is truncated.

  6. This method is not available when using the PL/B Web Server.

 

 

See Also: Method Syntax, TABCONTROL Methods

 



PL/B Language Reference GetTabParam Method (TabControl) InsertTab Method (TABCONTROL)