Click Event


PLBCMP GUI Only

square.png Objects

 

The Click event occurs when the mouse button is pressed and released over an object, Alt Keyboard Sequence selects an object, or the space bar is pressed over an object.

Note the following:

  1. The Click event is referenced using an event value of four (4). The equated label in PLBEQU.INC for this event is $CLICK.

  2. When the object is a TABCONTROL, the Click event is sent before the actual tab change is made. This allows access to the controls on the TABCONTROL that are about to be hidden. A CHANGE event is sent to a TABCONTROL when the tab change has been made.

  3. Selection of an item within a COMBOBOX results in this event.

  4. When the object is a RADIO or CHECKBOX and code is associated with the object, the state of the object is not changed by clicking the object. The associated code only is executed. The program must change the state of the object.

  5. A TREEVIEW object CLICK event will only occur once when using the left mouse button to cause a selection change. A CLICK event using the right mouse button will always occur whether an item is previously selected or not.

  6. For a MENU, FLOATMENU, SUBMENU, or TOOLBAR, the Event Result is the index of the item clicked.

  7. For a TOOLBUTTON with a dropdown menu, the Event Modifier is the index of the menu item clicked.

  8. The Click event for a WINDOW object occurs when a click action occurs for a ribbon element that exists for the current ribbon on a Window. (9.6) The result value that is returned with this event contains an ID value that is assigned to the ribbon element in a ribbon resource DLL. See the ribbon overview for a description about ribbon support that is available.

  9. The Click Event is generated for a DATALIST object when a left mouse click action or when a keypress action ( up arrow, down arrow, left arrow, right arrow, home, end, page-up, or page-down ) is taken. Also, the event modifier value for the Click Event is set to a value of zero when a left mouse click action generates the event. The event modifier value is set to a value of one if the Click Event was generated by a keypress action.

  10. The LABELTEXT click and double click events to return the a one based value indicating the $LISTLBL item being clicked.

  11. For a BUTTON object click event, the event Modifier value identifies when a DEFAULT or CANCEL key action generates the click event. If the 'eventMod' value is 0x100, a DEFAULT key action generated the click event. If the 'eventMod' value is 0x200, a CANCEL key action generated the click event. Otherwise, 'eventMod' value is zero.(10.0A)

  12. For a PICT and WINDOW objects, the event is only supported when using the PL/B Web Server.

LISTVIEW objects (9.4C)

The LISTVIEW object default action is to always generate a CLICK or DOUBLECLICK event when the mouse is clicked.

Note the following:

  1. The new default event behavior for a LISTVIEW object causes a CLICK or DOUBLECLICK event to always be generated when a mouse click is executed any where in the client area of the LISTVIEW object. If the mouse click action is over an existing row of the LISTVIEW, the CLICK result value is a zero based number that is the row number where the click occurred. If the mouse click action is not over an existing row, the CLICK result value is a 0xFFFFFFFF value.

  2. The old event behavior for a LISTVIEW would only generate a CLICK or DOUBLECLICK event when a row was selected or an unselected row still had focus at the time when the mouse was clicked. This old event behavior caused unexpected results when the LISTVIEW checkbox style was being used.

  3. The 'SETMODE *LVCLICKEVENTMODE={dnumnvar}' defines the click event behavior for a LISTVIEW object. If the *LVCLICKEVENTMODE is set to a value of zero (0), the CLICK event behavior is the same a described in note (1). This is the default behavior for a LISTVIEW CLICK event if the *LVCLICKEVENTMODE has never been set in a PLB program. If the *LVCLICKEVENTMODE is set to a value of one (1), the CLICK event behavior is the same as described in note (2).

  4. When a LISTVIEW object is created, the current CLICK event behavior is defined for the LISTVIEW. The created click event behavior continues to persist for the LISTVIEW view object unless it is changed using the 'SetLVFlags' method of a LISTVIEW.

 

 

 

See Also: EVENTREGISTER, Object Events, Object IO Instructions, Object Definitions

 



PL/B Language Reference ChildSig Event Close Event