Product Logo

CNS Menu

Dynamic Menus




This function will return a number to indicate which mouse button was last clicked. If you click on a button with the left mouse button, this function will return “1”. If you click with the right mouse button, it will return “2”. If you click with a third or middle button, it will return “3”. This allows your mouse buttons to act independently of each other, such as entering a field with the left mouse button and showing a menu with the right mouse button. You can also use the constant values “CNSMenu_LeftMouseButton”, “CNSMenu_RightMouseButton”, and “CNSMenu_ThirdMouseButton” to test for which button was pressed. For example, you could have the calculation “If( CNSMenu_GetMouseButton = CNSMenu_RightMouseButton ; CNSMenu_ShowMenu( ”RightClickMenu“ ) ; CNSMenu_ShowMenu( ”LeftClickMenu“ ) )” to show either a Left Click Menu or a Right Click Menu depending on which mouse button was pressed.

Return TypeNumber
Example 1

Returns "1" if the left mouse button was clicked.