ACTIVATE


PLBCMP GUI Only

 

The ACTIVATE instruction makes an object visible and allows the user to interact with it. While the format of the ACTIVATE statement is static, there are a number of considerations for each type object. See the specific object sections for details concerning the activation of the various objects. ACTIVATE uses the following format:

 

 

[label]

ACTIVATE

{object}[,{routine},{result}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A previously defined and created object or object pointer that is activated.

routine

Optional. A Program Execution Label called to process information if the user selects the object.

result

Optional. A Numeric Variable indicating the item within the object that was selected.

Flags Affected: NONE

 

Supported objects:

 

ANIMATE

EDITDATETIME

LISTVIEW

RADIO

TIMER

BUTTON

EDITNUMBER

MAINWINDOW

RADIOGRP

TOOLBAR

CHECKBOX

EDITTEXT

MENU

RICHEDITTEXT

TREEVIEW

CHECKGRP

FLOATMENU

MOVIE

SHAPE

VSCROLLBAR

COLLECTION

GROUPBOX

MREGION

SLIDER

WINDOW

COMBOBOX

HSCROLLBAR

NETCONTROL

SPLITTER

 

CONTAINER

HTMLCONTROL

PANEL

STATTEXT

 

CONTROL

ICON

PICT

STATUSBAR

 

DATALIST

LABELTEXT

POPUPMENU

SUBMENU

 

DIALOG

LINE

PROGRESS

TABCONTROL

 

Note the following:

  1. If the {result} field is too small to contain the result value, the OVER flag is set upon entry to the {routine}. This flag setting does not occur at the time of the ACTIVATE butat the time the {routine} is called.

  2. The {routine} is called as if a CALL instruction was performed. It is only called when a EVENTCHECK or EVENTWAIT is executed. The LABEL execution pointer variable cannot be used in an ACTIVATE instruction or a compiler error occurs.

  3. When the {routine} is complete, a RETURN instruction continues execution at the instruction following the EVENTCHECK or EVENTWAIT. Otherwise, a NORETURN instruction clears the return address from the call stack.

  4. All other object operations, such as scroll bar manipulation, movie controls, and screen updating, are automatically performed by the PL/B runtime.

  5. If the object specified by an ACTIVATE instruction has already been ACTIVATEd, the old {routine} and {result} operands are replaced with the new {routine} and {result} operands.

  6. An object must be CREATEd before being ACTIVATEd. If this is not done, a runtime error of O105 is generated.

  7. If insufficient memory is available to perform the operation, a runtime error of O106 is generated.

  8. If a FILEPI instruction is active, it is terminated.

 

 

See Also: Objects, DEACTIVATE, Object Instructions

 



PL/B Language Reference Object I/O Instructions CHECKITEM