Questions relating to the dynamic family of functions in Mathematica, such as Dynamic, DynamicModule and Manipulate.

learn more… | top users | synonyms

10
votes
2answers
382 views

Restrict Sensitivity of Locators in LocatorPane

We can restrict the movement of locators in a LocatorPane as follows: In the following example, the first locator's movement is confined to the x-axis and the ...
10
votes
4answers
480 views

Possible bug in Dynamic

The code below crashes the Mathematica kernel in version 10 (not in V9) every time I run it on Windows and on Mac OS. I've sent it to WRI, but was told that they could not reproduce the crash. Does ...
10
votes
2answers
301 views

Update only one element in a dynamic grid?

I've got a grid of buttons that each display an image from an array. When a button is clicked, its image changes. ...
10
votes
2answers
253 views

Difference between action of a Slider and a HorizontalGauge

First time posting. I am working on creating some interactive materials for the engineering classes that I teach and have run into an issue that I cannot puzzle out. I am using a slider to allow for a ...
10
votes
2answers
299 views

Two-sided slider getting stuck

I'm implementing a two-sided slider to be able to set upper and lower bound in just one slider: The problem is that it can get stuck when both locators are at the far left: And I'm unable to ...
10
votes
1answer
199 views

Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug introduced in 8 or earlier and persists through 10.3.1 or later Consider the following MWE: ...
9
votes
6answers
449 views

How to make text flash for a short period

How could I display text that flashed red for a half second or so and then reverted to black? (Or was put in bold and reverted to normal, etc.)
9
votes
5answers
523 views

Manipulate Exp[I θ]+b Exp[-I θ]

I've uploaded an image showing a demonstration I'd like to create, but I definitely need help. There is a lot of talent on this list, so maybe someone can help me get started learning how to add ...
9
votes
3answers
270 views

Problem with UpdateInterval

I want to monitor current results with Dynamic ...
9
votes
2answers
865 views

How To interactively create a Polygon in a Graphic?

Background: suppose I start with the following (working) snippet. Manipulate[Graphics[Line[{{0, 0}, p}], PlotRange -> 2], {{p, {1, 1}}, Locator}] Ideally, I ...
9
votes
2answers
213 views

Checking from a preemptive evaluation whether a main evaluation is ongoing

How can I programmatically check from a preemptive evaluation whether a main evaluation is currently ongoing? I need a function mainEvaluationOngoingQ[] so that ...
9
votes
3answers
263 views

Problem with CurrentValue[“MouseOver”] when graphics are wrapped with Deploy

Bug reproduced in: V 9.0.1 - 10.3 Please take a look at following toy example: ...
9
votes
1answer
505 views

Oval or Bunimovich stadium

The dynamic billiard demonstration, that can be found on wolfram demonstrations (here), is only designed for an ellipsoid-shape boundary(snapshot below). The idea is to have a dynamic billiard with ...
9
votes
1answer
155 views

Tracking Initialization

How to track Initialization step by step? Any tricky solution is ok. One condition, x should be ...
9
votes
3answers
241 views

Asynchronous evaluation on EventHandler

How can I make this progress bar appears when I press Enter? The Button Evaluate works just fine, but when Enter is pressed it jumps the progress bar. It would be ...
9
votes
2answers
143 views

Dynamic cells after Kernel restart/quit:

After quitting the kernel only one Dynamic cell fires. And it does not matter how many are there. ...
9
votes
1answer
114 views

How to synchronize the display of dynamic objects?

I was looking at this question, which asks to keep the orientation of some 3D graphics objects constant (relative to the viewer) while rotating the rest with the mouse. I thought that maybe the ...
9
votes
2answers
719 views

What causes Manipulate to stop evaluating expressions?

I'm working on a N-body simulation within Mathematica, and currently I have something along these lines: ...
9
votes
1answer
404 views

How to restrict the mouse cursor to stay within a box?

I'm trying to use Mathematica to write small games, and I find that it would help to restrict the player's mouse into the game window (just like other games do). Is there any way to achieve this? ...
8
votes
4answers
249 views

Data Entry via 2D Graphic (formerly: Using a Slider2D to add data points to a list)

This bit of code sets up a list with the first entry already in it -- {{1,1}}: ...
8
votes
3answers
242 views

How to allow ContinuousAction on something that is not all

I have this code: DynamicModule[{r = 1}, Grid[{{Slider[Dynamic[r]], SpanFromLeft}, {f[Dynamic[r]], g[Dynamic[r]]}}]] While I move the slider, $f$ ang $g$ are ...
8
votes
2answers
739 views

What is special about 70.329862 and InputField and Number and Dynamic?

Is this a bug (happening in V9 and V10 Windows, Linux) or not? It only happens for certain numbers and you need Number in InputField. ...
8
votes
2answers
2k views

Dynamic graph visualisation using JLink/Java and GraphStream

Visualising the addition of new nodes and edges to a graph to 'watch it grow' is to something Mathematica is not suited to by default. However this type of animation really helps convey the emergence ...
8
votes
2answers
346 views

AJAX-style HTTP calls triggered by a variable change

I'm trying to create a dynamic InputField that would autocomplete the address as I type it into the field, by calling Google Maps' GeoCoding API on every change of ...
8
votes
1answer
369 views

I want to update a financial chart when I select a new stock from a popup menu

I have the following code: Read all the DOW jones financial instruments instruments = FinancialData["^DJI", "Members"] Then I create a dynamic variable called ...
8
votes
3answers
733 views

How to use custom Dynamic inside Manipulate

I was wondering if it is possible to use a custom Dynamic[var, function] inside a Manipulate. The reason for the need is this: ...
8
votes
1answer
654 views

Generating dynamic Inputfields

I want to create a bunch of input fields, four in this case, one for each element of the list "x", but since Dynamic has ...
8
votes
2answers
314 views

Palette button with progress bar

Let's say you have a palette with a button that has to do some time-consuming task when clicked: ...
8
votes
5answers
727 views

How to save Manipulate bookmarks permanently?

I would like to save current Manipulate parameter values to load them again later. Bookmarks (previously discussed here and here) work fine until the cell is ...
8
votes
2answers
131 views

Passing an unevaluated part of an association to a function

I'm making a UI widget that controls sound volume on a speaker using a slider, e.g.: ...
8
votes
2answers
196 views

Is it possible to make a variable wrapped in Dynamic non-dynamic?

If I have a function call wrapped in Dynamic can I make one or more of the parameters in the call non-dynamic? i.e. I would like to make ...
8
votes
1answer
150 views

Dynamic does not update when wrapped in DynamicModule

I'm trying to wrap some dynamic code into DynamicModule to localize all the variables, yet when I do that, the variables stop updating. That does not happen if I ...
8
votes
1answer
767 views

Prevent PopupWindow from opening multiple windows

PopupWindow objects can be clicked multiple times, opening multiple popup windows for the same object. How can I prevent this? A bit more detail: I have an ...
8
votes
1answer
107 views

How can I defer the loading of a PopupView control until it is used?

Background: I have several PopupViews of which the loadtime adds to the startup time of a program. To improve the perceived performance I want to defer the loading ...
8
votes
1answer
179 views

Using GraphHighlight interactively

I want to build a small GUI, where the user can select either a single edge or a single node of a graph. I got to this point: ...
8
votes
1answer
325 views

Why do Tooltips slow down Dynamic so much? Is there a faster alternative?

I'm working on a Dynamic ListPlot with a few thousand plots, and it seems that wrapping the points with Tooltip slows the Dynamic responsiveness substantially. With the simple example below, dragging ...
8
votes
2answers
350 views

Strange behavior of CreateDialog's WindowSize option

Compare the two dialog windows, created by the same code except in the first WindowSize has a value while I omit it in the second one. Note, that ...
8
votes
2answers
781 views

Switching off Dynamic updating on a cell by cell basis

Is there a simple way to switch off Dynamic evaluation for a particular cell? I usually delete the cell if it disturbs other evaluations or affects the performance ...
8
votes
1answer
430 views

Way to find color at a point in a Graphics?

I need to figure out a way to find out the RGB color value at a certain coordinate in a Graphics object. The Graphics object I am dealing with is continually Dynamically updated, so it is made of ...
8
votes
1answer
201 views

How to make MousePosition more reliable

This takes a little patience to reproduce, but I got a screenshot of it in version 9 on Mac OS X 10.7.5: With a small Graphics object, it occasionally happens that ...
8
votes
1answer
444 views

Locking a value when Manipulating variables

I'm trying to achieve something similar to Bret Victor's brilliant Scrubbing Calculator in Mathematica. By using Manipulate I'd like to change the values of the variables such that if I modify one ...
8
votes
1answer
288 views

The most simple Manipulate freeze the notebook on v10.1

I realize this won't be a particularly clear question. As I'm not able myself to find a pattern for the problem I'm talking about I won't be able to give enough informations to make it fully ...
8
votes
0answers
87 views

Graph: PropertyValue changes and Dynamic

I almost never work with Graph in Mathematica but lately I helped someone with it. For this, I tried to make an animation using ...
7
votes
4answers
256 views

Dynamic Epicycles

Thanks to all the thorough answers and comments, I've written the following code, which builds a variable number of epicycles. However, when I apply the formula ...
7
votes
2answers
455 views

Click in a vector plot to plot several solutions of a system of differential equations

I am aware of the Locator button and I am aware of the Equation Trekker package, but they are not what I want to use. Here is what I specifically want to know how to do, if possible. Consider the ...
7
votes
2answers
836 views

Moving From Dynamic Module to Manipulate

In trying to implement Vitaly's suggestion about how to take control of Locator events, I have been able to make headway using ...
7
votes
2answers
410 views

How to efficiently get the value from form UI built with dynamic InputField

Here is the code that I used to make a tabular UI. ...
7
votes
3answers
276 views

Wrapping EventHandler by Table

I am making a grid on the screen. The grid is composed of different expressions. I want all of them to have a Gray background, which turns into a ...
7
votes
2answers
285 views

Moving controls from Manipulate to a Palette ( or similar GUI object )

Consider the following snippet as a reference. ...
7
votes
3answers
101 views

Prevent Dynamic from behaving dynamically until notebook evaluated

If a notebook containing a = {1, 2}; Dynamic[a[[2]]] (* 2 *) is executed, closed, and then opened in a new session, it yields along with the expected error ...