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

learn more… | top users | synonyms

9
votes
2answers
778 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
204 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
248 views

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

Bug reproduced in: V 9.0.1 - 10.1 Please take a look at following toy example: ...
9
votes
1answer
446 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
150 views

Tracking Initialization

How to track Initialization step by step? Any tricky solution is ok. One condition, x should be ...
9
votes
3answers
211 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
1answer
163 views

Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug reproduced in: Win7: V9.0.1, V10.0.2, V10.1.0 ...
9
votes
1answer
101 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
670 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: ...
8
votes
4answers
235 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
238 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
729 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
326 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
352 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
631 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
613 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
274 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
681 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
3answers
699 views

What is the right way to construct DynamicModule

When I'm creating DynamicModules for CDF purposes I'm usualy basing on my experience with that, particular goal and content rather than on deep insight. I want to ...
8
votes
1answer
694 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
101 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
174 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
294 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
339 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
1answer
406 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
191 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
0answers
79 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
2answers
406 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
365 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
271 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
270 views

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

Consider the following snippet as a reference. ...
7
votes
2answers
462 views

Detecting double click events

Is there a way to detect double click events? I did not find anything on the doc page of EventHandler. Use case: I want to re-implement the ...
7
votes
1answer
204 views

Asking for input in an event handler

Why won't EventHandler["text", {"MouseClicked" :> (output = Input[];)}] work? When I click "text" the kernel hangs.
7
votes
2answers
99 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.: ...
7
votes
1answer
494 views

Want Interactive PlotRange of Graphics[{}]

I am trying to do: ...
7
votes
2answers
155 views

Making ColorSetter work like a PasteButton

I might be missing something obvious here. I am building a palette for constructing code to make certain graphics. The idea is that my colleagues can click buttons instead of having to know the right ...
7
votes
2answers
189 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 ...
7
votes
1answer
177 views

Momentary Checkbox

I'm trying to create a demonstration in Mathematica where a checkbox will show an answer, but I only want the answer to be shown while the mouse button is pressed. There seems to be a ...
7
votes
1answer
306 views

Poincaré map for dynamic billiard

There's a very nice demonstration of dynamic billiard written by Dan S. Reznik that can be found on demonstrations wolfram(along with the code): here I was thinking whether it would be possible to ...
7
votes
1answer
207 views

Prevent interdependence of controls

My question is probably best illustrated with this small sample code: ...
7
votes
1answer
155 views

How to inherit options by scoping?

Consider the following example: you have a function framed producing a cell with a button that, when pushed, calls framed again. ...
7
votes
2answers
665 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 ...
7
votes
1answer
244 views

Why is the Locator snapping back to the original coordinates? How can I prevent this?

Take the following code: p = {3, 3}; Graphics[Circle[{5, 5}, 5], Epilog -> Dynamic@Locator[Dynamic[p]], Axes -> True, GridLines -> {{3}, {3}}] ...
7
votes
2answers
192 views

Dynamically transform one Graphics to another

I would like to have two Graphics objects displayed side by side such that: they are mirror images of each other if I change the left-hand one interactively using ...
7
votes
1answer
353 views

How to make dynamic input fields work with drag & drop

I have an application using InputField to allow a user to dynamically update a data structure. In some cases the user will want to remove a string from one field ...
7
votes
1answer
434 views

How to create a multi-selectable setterbar with colored buttons

Background: consider the following code-snippet. ...
7
votes
1answer
201 views

How can I have interruptible computations inside a manipulate?

Here's a perfect example of my problem: Manipulate[Pause[n], {n, {1, 10}, ContinuousAction -> False}, SynchronousUpdating -> False] It is illustrated by ...
7
votes
2answers
151 views

How to track Part of Symbol or How to symbolize Parts of Symbol without copying data

Let's create simple function: SetAttributes[h, HoldFirst]; h[data_] := Dynamic[Grid[data], TrackedSymbols :> {data}] test = RandomReal[1, {2, 2}]; h[test] ...
7
votes
1answer
224 views

Can I select or implement a Manipulate bookmark from an arbitrary control?

I understand how I can select a bookmark from the "+" menu of a Manipulate. Is there a way to select a bookmark from an arbitrary control, or define a control that ...