Re:
Posted: 22 May 2014 22:13
Hello!
This code does not work in Visual Prolog 7.4:
But getFocusListener works well for right-mouse clicks:
This code does not work in Visual Prolog 7.4:
Code: Select all
predicates
onButtonMouseDown : window::mouseDownListener.
clauses
onButtonMouseDown(_Source, Point, ShiftControlAlt, Button) :-
stdio::writef("Point = %, ShiftControlAlt = %, Button = %\n", Point, ShiftControlAlt, Button).
Code: Select all
Button:addGetFocusListener(onButtonGetFocus),
Code: Select all
predicates
onButtonGetFocus : window::getFocusListener.
clauses
onButtonGetFocus(Button):-
Button:setText("!").