GetButtonByState Method (TOOLBAR)


9.1A, PLBCMP GUI Only

 

The GetButtonByState method scans a TOOLBAR object and fetches the tool button that has a specified state. The method uses the following format:

 

[label]

{object}.GetButtonByState

[GIVING {return}] USING [*Key=]{key}]:

 

 

[[*State=]{state}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A TOOLBAR object that is scanned.

return

Optional. A TOOLBUTTON that matches the requested state.

key

Required. A Character String Variable, literal or Numeric Variable that specifies the run-time name or zero-based position of the button where the scan will start.

state

Optional. A Numeric Variable that specifies a state value as described below.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The EOS, OVER, and ZERO flags are cleared.

  2. When the {key} is a Character String Variable or literal, the string data is the runtime name for the TOOLBUTTON object where the scan is to start.

  3. When the {key} is a Numeric Variable, its value is a zero based index of where the scan is to start.

  4. The {state} values are as follows:

 

Value

State of ...

1

PUSHED property is on.

2

PARTIALPUSHED property is on.

3

ENABLED property is on.

4

VISIBLE property is on.

5

AUTOSIZE property is on

 

 

 

See Also: Method Syntax, TOOLBAR Methods

 



PL/B Language Reference GetButton Method (TOOLBAR) RemoveButton Method (TOOLBAR)