Questions tagged [eventhandler]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
223 views

How to get what mouse button was pressed in EventHandler?

I'm trying to make an interface that (basically) records what mouse button was pressed inside the cell of a matrix. The code I have so far is ...
Eriek's user avatar
  • 827
6 votes
2 answers
162 views

Abort an EventHandler?

How do I stop an EventHandler? I'm trying to allow the user unlimited inputs on the arrow keys UNTIL certain conditions are met, and then stop the ...
incredi_imp's user avatar
3 votes
1 answer
117 views

How to mimic CheckboxBar's Method->"Active" option in a Manipulate's checkbox control?

CheckboxBar has a Method -> "Active" option that allows you to click the label to change the state of a checkbox. I would ...
Edmund's user avatar
  • 42.3k
3 votes
1 answer
600 views

How to Use Mouse Events & EventHandler in Demonstrations

One of the primary criteria for an acceptable Demonstration is, of course, that multiple copies of the Manipulate Output Cells [MOCs] have to have independent controls and datasets: the operation of ...
Steersman's user avatar
0 votes
1 answer
243 views

How can I manually pick the data out of the image of a plot?

edit: The automatic way listed here doesn't work for an application like mine in which there are several curves on the same plot that all have the same markers, but you only want one curve (it will ...
YungHummmma's user avatar
  • 3,042
8 votes
1 answer
231 views

Docked cell showing keystrokes and mouse buttons actions

When I send bug reports to WRI, sometimes I attach a screen video record, like on the following example (that I just sent as an improvement suggestion). As you can see, I use OSD Hotkey, to make sure ...
P. Fonseca's user avatar
  • 6,665
7 votes
1 answer
247 views

Triggering events based on choices made inside of system dialogs (e.g. window close)

I'm trying to arrange for Mathematica to perform a certain action every time a notebook is saved or closed (with or without saving). The obvious way to do this would be through event handling. So, ...
Paco Jain's user avatar
  • 897
1 vote
1 answer
170 views

How to update plot with EventHandler without using Print

Consider the following code: ...
anderstood's user avatar
  • 14.3k
3 votes
2 answers
129 views

How to get highlighted text from event

I want to do the following: Given a text in a Mathematica dynamic module "at runtime". If some text is selected with the cursor/mouse, after the mouse button release, get the selected text. Thank ...
Ricsi Nincs's user avatar
5 votes
1 answer
92 views

Dynamically highlighting elements sharing common properties

I want to make a table of elements such that when the cursor is over a target element, all other elements of the table sharing some specified common property with the target are highlighted (let's say ...
glS's user avatar
  • 7,623
1 vote
0 answers
80 views

How can I perfect this game for Wolfram Demonstration publication? [closed]

When the messages change the window inactivates, and when I try to host an interactive CDF on my site it turns red and says something about numbers having to be scaled or offset. Any help? I'm ...
Sam's user avatar
  • 39
3 votes
0 answers
53 views

EventHandler click event in Graphics[ ] object does not work properly after using Deploy [duplicate]

There is a problem clicking layered Graphics objects after using Deploy. For example, the code below works as intended with the Disk 'on top of' the Line. Click either object anywhere and EventHandler ...
Robert's user avatar
  • 435
1 vote
1 answer
189 views

Moving circle within an Animate by clicking on the contents pane

I made this: ...
Molnár István's user avatar
7 votes
1 answer
402 views

What is "MouseDragged"?

Bug introduced in V10.1 or earlier and persisting through V11.3 Print is triggered just by pressing the mouse button. ...
Kuba's user avatar
  • 137k
1 vote
1 answer
432 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? ...
Chien-Ching Vincent Hsu's user avatar
1 vote
1 answer
75 views

Using Loop to create mutiple EventHandlers

I have a problem, that is I want to use loop to create multiple EventHandlers, but my code shows nothing. What can I do? ...
Chien-Ching Vincent Hsu's user avatar
9 votes
2 answers
403 views

Throttle the response to keystrokes in an EventHandler expression

What might be the most elegant way to throttle the a,s functions triggered by an EventHandler...
William's user avatar
  • 7,605
5 votes
4 answers
961 views

EventHandler Not Detecting KeyDown

I am trying to use EventHandler to detect KeyDown within a LocatorPane. Anytime I press a key inside the LocatorPane the proper action is not executed (doesn't matter which key I choose) but rather ...
user13999's user avatar
  • 907
3 votes
2 answers
157 views

Circumnavigate a curve (part 2)

I got help from Kuba on a previous post regarding this issue I'm having but after integrating that solution into my code, the problem changed and I am left with something I don't know much about (even ...
baumannr's user avatar
  • 787
1 vote
0 answers
117 views

Strange behavior of my vertex eventhandler!

I have two level EventHandler. The inner one is made of vertex of Graph and the other outer one is of the Dynamic Graph. (1) If I select a arbitray place on the Graph except a vertex, then every ...
Junho Lee's user avatar
  • 5,155
0 votes
1 answer
175 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 ...
Putterboy's user avatar
  • 4,661
7 votes
2 answers
378 views

Why the Mouse dragging response not as smooth as Locator

I am experimenting to use MouseDragged eventhandler to change the vertices positions of a triangle, it works, but not as smooth as using Locators. Is this the ...
Putterboy's user avatar
  • 4,661
6 votes
2 answers
224 views

Generating EventHandler using Table

I would like to change the edge color of a graph when double clicking on it, the following code works: ...
Putterboy's user avatar
  • 4,661
0 votes
1 answer
440 views

Using variable with delay in WhenEvents in NDSolve

I have a system of differential equations which is solved correctly. However, I want to trigger two events, one of which depends on the "time elapsed" after of the first event trigger. Is it possible ...
tquarton's user avatar
  • 427
4 votes
0 answers
247 views

Is it possible to model the piano key attack?

My purpose is to model the attack of a piano key. As the key is pressed a sound must be emitted. When the key is released the sound must stop with decreasing volume. I have a partial success when ...
kornaros's user avatar
  • 1,047
4 votes
2 answers
213 views

Using MousePosition on the entire screen - Screencast with Linux

In order to record animations more easily while using Mathematica on Linux, I would need to know how to get the position of three clicks. The following picture (main part generated by ...
Öskå's user avatar
  • 8,587
2 votes
1 answer
356 views

DynamicModule with Plots and EventHandler

I am making a little animation in Mathematica, along the lines of some of the Wolfram demo projects. I'd like to animate a simulated trajectory of a random process (say a Poisson process), and while ...
zab's user avatar
  • 275
6 votes
1 answer
185 views

How to handle keyboard events for unselected item in CDF?

How can I force the keyboard input to work for this cell without clicking on it after I evaluate or showing a blinking selection cursor? This is for running CDF games in a browser. ...
Michael Hale's user avatar
  • 2,313
5 votes
2 answers
247 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 ...
Steve D's user avatar
  • 2,209
5 votes
2 answers
2k 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 ...
verse's user avatar
  • 1,287
1 vote
1 answer
212 views

Extract Graphics properties using EventHandler

One can find primitives' properties such as the radius, the center or the color of a Disk using Cases by using: ...
Öskå's user avatar
  • 8,587
7 votes
1 answer
299 views

Detect a graphic primitive inside a Graphic

Please excuse me if that question is too basic but I couldn't find anything in the documentation or on here. If you consider the following Graphic I would like to ...
Öskå's user avatar
  • 8,587
-2 votes
2 answers
198 views

EventHandler and ActionMenu

Here is the bit of code causing me issues: ...
Öskå's user avatar
  • 8,587
5 votes
2 answers
374 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": ...
Gabriel's user avatar
  • 1,877
1 vote
1 answer
132 views

InputField Insertion Point Movement

I am trying to make the Return Key move the insertion point to the end of the input field's text. Please see the example below for the problem I am facing. Namely, when the return key is pressed, the ...
teedr's user avatar
  • 455
1 vote
1 answer
232 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 ...
Tebe's user avatar
  • 571
10 votes
3 answers
4k 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 ...
Andrew Cheong's user avatar
2 votes
1 answer
263 views

Delay of events detection dependent of "MouseDown" position

Let's say we have a Rectangle with color which depends of CurrentValue["MouseOver"]: ...
Kuba's user avatar
  • 137k
1 vote
1 answer
247 views

How to preserve focus on InputField after Print?

If you press Enter in the example below it should become clear that test is being adding to the textbox instead of the current ...
William's user avatar
  • 7,605
10 votes
1 answer
311 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. ...
William's user avatar
  • 7,605
2 votes
1 answer
243 views

Change the behaviour of a LocatorPane

Normally, LocatorPane detects any single click as in the following example: ...
kornaros's user avatar
  • 1,047
2 votes
3 answers
598 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 ...
Matt's user avatar
  • 317
3 votes
1 answer
229 views

How can I improve my Zooming code?

I recently started to work with the EventHandler function to make it possible to Zoom, Pan, etc, with only the use of a mouse. I have found a way to zoom that is ...
Matt's user avatar
  • 317
1 vote
0 answers
812 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 ...
verse's user avatar
  • 1,287
3 votes
1 answer
302 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 ...
verse's user avatar
  • 1,287
2 votes
1 answer
312 views

Detecting change of a variable (detect mouse clicks)

I want to do something when the mouse is clicked. But it shouldn't matter where the mouse is clicked, so I can't use EventHandler. Instead, I'm trying to do it like ...
C. E.'s user avatar
  • 70.6k
2 votes
1 answer
329 views

Can't see updating performed by NMinimize[...,StepMonitor->(...)] outside of Button in which it's called [duplicate]

I've made a peak-fitting GUI in which I have a "Fit" button that, when pressed, calls NMinimize[...,StepMonitor->(step++)] to minimize a sum of squared ...
Adam W.'s user avatar
  • 23
5 votes
1 answer
578 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 ...
Kuba's user avatar
  • 137k
173 votes
1 answer
31k 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 ...
faleichik's user avatar
  • 12.7k
1 vote
1 answer
691 views

EventHandler {"MouseDown", 1} with PassEventsDown -> True not working as expected

I want my EventHandler to respond only to left mouse clicks and pass the right mouse click to the built in event handler. I have tried ...
Ajasja's user avatar
  • 13.7k