Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [eventhandler]

The tag has no usage guidance.

160
votes
1answer
28k views

Mathematica Minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...
5
votes
2answers
1k views

Detecting changes of variables' values

Is it possible to detect (and create a trigger for) an event when any of the variables defined in the notebook changes its value (for any reason)? I need to know which variable got changed and what ...
27
votes
4answers
2k views

Detecting KeyUp events

Is there a way to detect when a key is released, similar to EventHandler[InputField[], {"KeyDown", "k"} :> Print["k pressed"]] It seems such detection isn't ...
8
votes
3answers
2k views

Hovering mouse cursor over a plot to display a “corresponding” point in another plot

I'm trying to reproduce a variant of this view, where hovering the mouse over a point highlights its "corresponding" point on all plots: In my case, the additional complexion is that the x-axes are ...
10
votes
1answer
249 views

Detect when InputField gets keyboard focus

How might I detect when an InputField comes into focus? For example ideally something like this would work. ...
5
votes
1answer
493 views

Evaluation order control

This question is related to Evaluation order of Button's action Concusion was, Button[]'s actions are evaluated in preemptive link so "the code that needs to ...
25
votes
1answer
737 views

How to improve these WASD + mouse look 3D controls?

Insipred by this question and the corresponding answer I've written a code for full-screen exploration of 3D scenes using standard WASD and mouse look controls. Here it is. ...
5
votes
2answers
210 views

Capturing an F1

I teach an Intro to Mathematica course, and one of the things I try to reinforce early on is just how helpful Mathematica's help is. In the very first lab for the course, I even give the students a ...
0
votes
1answer
147 views

What is wrong with combining two programs with event handlers?

I can delete the unwanted nodes of a RandomGraph by double-clicking on them from the first program, and I can change the positions of the nodes by dragging them ...
2
votes
3answers
497 views

Changing the Actions in EventHandler

I would like to be able to change which action specified events take depending on some condition. For example, I have established a SetterBar ...
1
vote
1answer
323 views

How to combine manipulate and eventhandler

I combine manipulate and eventhandler, now I can change the controller when working on eventhandler, but how to change the value in eventhandler when I control the manipulate controller? ...
18
votes
1answer
2k views

How to draw an interactive, mouse clickable, 3D Bloch sphere?

A 3D Bloch (Poincaré) sphere is nicely shown in this wolfram demonstration. However, in that example, it is not possible to mouse select a point on the sphere and directly get the corresponding qubit ...
12
votes
1answer
320 views

How to create Right-Click ActionMenu at mouse position?

I have a Grid and need to enable some actions on individual values. For this I want to use an ActionMenu that shows on right-...
3
votes
1answer
265 views

Creating event handler with ImplementJavaInterface inside a package

I am trying to make my Mathematica function to serve as an event handler for the events generated by a Java object. Specifically, I have a Java object that connects as a client to a server that ...
1
vote
1answer
211 views

BindEvent binding own function

I need to change property of window when button gets pressed. There are pretty enough examples on Wolfram's website, but all they bind predefined function "Print[]" and I have no problems with ...
1
vote
0answers
566 views

Is it possible to create an event handler for changes in values of variables? [duplicate]

I am creating a networking application in Mathematica that runs a non-stop simulation, and periodically receives new information from the remote server that affects the simulation. Whenever values ...
4
votes
2answers
304 views

EventHandler and Refresh rate

Based on the example of the Documentation of MousePosition, Properties and Relations, here is my test code using "MouseDragged" instead of "MouseClicked": ...
2
votes
1answer
188 views

Delay of events detection dependent of “MouseDown” position

Let's say we have a Rectangle with color which depends of CurrentValue["MouseOver"]: ...
2
votes
1answer
377 views

Dynamically updating interactive objects in Mathematica

Is it possible to create interactive code in Mathematica (via EventHandler[] or Manipulate[] perhaps) that continually updates some calculation based on external data in the time when no user input is ...
1
vote
0answers
77 views

Custom FrontEndToken calls

So I've been playing with FrontEndTokens recently and discovered that there are some of them that don't seem to have a standard-usage way of being called. For ...
4
votes
1answer
107 views

Modify Dynamic value within EventHandler

I'm trying to build a tic tac toe program using a 3x3 board list running inside of a DynamicModule with a separate window displaying the current value and accepting ...
3
votes
2answers
139 views

How can I draw a variable number of dynamic, interactive objects, preserving their internal states?

Consider the following toy example: I have a "dynamical, interactive" graphics primitive like the following: ...
3
votes
1answer
280 views

Problem with dynamic MouseAppearance updating while “MouseDown”

my problem is with combining EventHandler and MouseAppearance. I want to change cursor appearance if I have primary button ...