*LVCLICKEVENTMODE (GETMODE)
9.4C
*LVCLICKEVENTMODE={mode}
The *LVCLICKEVENTMODE control reports the click event behavior for LISTVIEW objects.
If the *LVCLICKEVENTMODE is set to a value of zero (0), a new CLICK event behavior occurs as 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), CLICK event behavior as descriped in note (2.) occurs
Note the following:
The new default event behavior for a LISTVIEW object causes a CLICK or double CLICK event to always be generated when a mouse click is executed anywhere 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.
The old event behavior for a LISTVIEW would only generate a CLICK or double CLICK event when a row was selected/highlighted 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.
The *LVCLICKEVENTMODE keyword only sets the default mode that is applied to a LISTVIEW object when it is created. After a LISTVIEW object has been created, the CLICK event behavior can only be changed using the LISTVIEW SetLVFlags method.
See Also: List Controls (GETMODE), GETMODE
![]() |