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

learn more… | top users | synonyms

7
votes
2answers
497 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 ...
10
votes
1answer
212 views

Notebook's WindowSize interference with contents' Dynamic ImageSizes

Bug introduced in 8 or earlier and persists through 10.4.0 or later Consider the following MWE: ...
4
votes
4answers
600 views

How to select interactively datasets to plot with Manipulate

I'm using Manipulate to visualize three datasets: Manipulate[ListPlot[WHAT -> what], {what, {dataset1, dataset2, dataset3}}] Now with this solution I can only ...
0
votes
1answer
173 views

Slow Dynamic Button Does Not Print [duplicate]

Possible Duplicate: Why do buttons with ChoiceDialog freeze the front end? Why is SystemDialogInput failing to return a save file path? Evaluation inside Button stops after some seconds I ...
31
votes
4answers
1k views

Does Mathematica have a built-in date picker?

Does Mathematica have an interactive date input control that lets the user choose a date by browsing to a calendar view and returning the selected date as a date list? For example, something like the ...
15
votes
3answers
1k views

How can locators be added to the points on a 3D grid?

Here is a pared down example of some 3D data that I want to make dynamic and add locators to each set of points. Is that possible? ...
16
votes
5answers
1k views

Using DynamicModule variables outside the DynamicModule

Take the following example for hiding/showing a notebook through a Checkbox: ...
25
votes
4answers
1k 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 ...
9
votes
2answers
380 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 ...
16
votes
1answer
735 views

Manipulating a continuous stream of sounds

I need some audio-feedback when a locator is moved on a surface. I have the following code that produces a beep every time the dynamic controller is interacted with such that the pitch of the sound ...
11
votes
2answers
430 views

Dependent Manipulate sliders

I would like to use dependent sliders in Manipulate. First slider K0 should be independent and varied from ...
12
votes
3answers
332 views

In InputField, how to prevent Shift-Return from generating a new cell?

When running the following in a notebook (not a deployed CDF file), it can sometimes be annoying that accidentally pressing Shift-Return breaks out of the user ...
7
votes
1answer
409 views

Execute code when file is modified

I have a function the takes some time to complete. The function imports data from a .csv, parses it, and plots certain vectors from there. The .csv is constantly being updated from an external ...
12
votes
5answers
2k views

How can I simulate this animation of checking for prime numbers?

I can only implement a very simple one, I want to make my code look like that. Any better ideas? ...
11
votes
3answers
316 views

Intermediate display similar to PrintTemporary

Using MMA we often come across situations like the following cityLIST = CityData[#, "Name"] & /@ CityData[]; This code if you evaluate will emit some display ...
9
votes
3answers
298 views

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

Bug reproduced in V9.0.1 and persisting through V10.4.1 Please take a look at following toy example: ...
7
votes
3answers
282 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 ...
6
votes
1answer
264 views

Dynamic and Refresh

If I am not mislead by my memory, in Mathematica 6 a function Refresh was introduced, having the options UpdateInterval and ...
6
votes
3answers
531 views

Unexpected Setter Bar Behavior when Manipulate Nested in Dynamic Module

Consider this code: DynamicModule[{x, y}, x[t_] := t^2 + 5; y[t_] := t^3 + 5; Manipulate[Plot[fcn[t], {t, -5, 5}], {fcn, {x -> "Square", y -> "Cubic"}}]] ...
5
votes
1answer
223 views

Alternative updating of a dynamic expression

I am looking for a solution to selectively update a dynamic expression expr which is dependent on multiple control variables ...
4
votes
4answers
344 views

Change all Options of Plot Dynamically

I am trying to make a series of changes in the appearance of the Plot of some function. I am trying to use Manipulate for my experiments. I tried to change the following code ...
3
votes
2answers
400 views

Why does the syntax highlighter color a local symbol red inside DynamicModule?

I am adding a Module inside DynamicModule here is an example (thanks to @rm-rf for this simple example) ...
2
votes
1answer
66 views

Create a notebook and save it without prompting Dynamics

This is closely related to the recent: Creating self destructing notebook. However the answer doesn't work in my case. ...
2
votes
1answer
141 views

How do I constrain movement for lists of Locators using 2nd argument of Dynamic?

I need to display edge labels of a graph in a way that allows the edge labels to be moved. Locator seems the simplest and most obvious function to use. My ...
2
votes
1answer
302 views

Why is this expression being held, and how can I evaluate it?

I can't figure out why an expression isn't evaluating, even though there's no Hold* in its FullForm: ...
11
votes
1answer
642 views

InputField does not update correctly

By fiddling with Vitaliy's solution for a small GUI, I've come accross this particular behaviour of InputField: ...
4
votes
2answers
257 views

Manipulate in Manipulate

Question 63982 (Altering values in Manipulate with dynamically generated controls) got a very interesting answer from @belisarius, in which he used a Manipulate ...
4
votes
0answers
264 views

DynamicModule, SaveDefinitions and global functions

Unfortunately, I had not checked stackoverflow, because there, the exact same behavior was already reported. Please see the Q&A "SaveDefinitions considered dangerous". Up-front, I'm on Ubuntu ...
4
votes
2answers
203 views

How to execute a function each time the slider is dragged?

I've created a function f and a slider: Slider[Dynamic[y],{1,4}] How to execute/call f ...
30
votes
4answers
1k views

Question about collections of custom GUI controls for Mathematica

Background: I have only recently begun programming GUIs in Mathematica, so I have a continuous need for custom controls. I needed a scrollable list control and with the help of Google I found a ...
32
votes
1answer
413 views

Quickly look-up usages, options and attributes of symbols

When I'm writing code in the front-end, I find myself very often looking up the list of options of a symbol over and over again in the documentation center. In most cases you find there a list of ...
34
votes
2answers
1k views

Documentation searches hang frequently: Anyone else dealing with this?

I've been struggling with a number of hangs, dynamic timeouts, and outright crashes when using the search/documentation center in version 9. I've tried uninstalling/reinstalling and clearing ...
19
votes
2answers
670 views

Dynamically splitting Disks with Mouseover

I've recently stumbled across this site: Koalas to the Max, and the first thought that came to my mind was "I want to recreate this with Mathematica". As a first step I tried to create a ...
22
votes
2answers
423 views

What is the equivalent of a prototypical Manipulate in lower level functions?

Background: In the Mathematica tutorial 'Dynamic Interactivity' I read that there is a way of developing GUIs in Mathematica that do not use Manipulate. I want to ...
15
votes
1answer
296 views

Dynamic and LibraryLink: dynamic visualization of a simulation

I am asking this question to save some time and I am expecting answers only from people who have tried something like this before. (I realize that I could just try it and see if it works, but that ...
14
votes
2answers
808 views

Manipulate slider unresponsive after suspend in Linux

I've tested Linux Mathematica versions 7-9 on various Linux distributions, with identical problem: after suspend/resume cycle my Manipulate controls (i.e. sliders&buttons) appear unresponsive, ...
11
votes
1answer
230 views

How can I include functions from a package into a CDF file?

I am building an application which I would like to deploy as a CDF file, and I am struggling to make the CDF exports work correctly with functions pulled from a .m package file. What are good/best ...
14
votes
1answer
171 views

How to make a dynamic nested menu?

There is no dynamic controller that can represent a hierarchical menu structure: ActionMenu can only handle flat action lists. Thanks to Kuba, we know a lot about ...
21
votes
0answers
603 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. ...
18
votes
1answer
259 views

What is the difference between Dynamic[x] and Dynamic[ h[x] ] for DynamicModule variables?

Bug introduced in 9.0 or earlier and persisting through 10.4.1 Why plain Dynamic[x] is less sensitive and less likely to automatically be updated than e.g. ...
12
votes
4answers
472 views

Graphics can't be live and editable

Is there a way to construct an interface so that the Code and the Graphics remain in sync? For example I would like to be able to drag/drop and move around different shapes in Graphic while seeing ...
7
votes
1answer
565 views

Want Interactive PlotRange of Graphics[{}]

I am trying to do: ...
5
votes
1answer
266 views

Control variable and body variable decoupling in Manipulate

This issue was raised as an offside problem in this thread. Consider the following example, that does not work as expected: ...
6
votes
1answer
560 views

Using more than one set of Locators in a Manipulate

I need to add locators dynamically to different sets. With one set this works OK: ...
9
votes
2answers
162 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.: ...
9
votes
1answer
157 views

Tracking Initialization

How to track Initialization step by step? Any tricky solution is ok. One condition, x should be ...
9
votes
6answers
463 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.)
8
votes
1answer
460 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 ...
7
votes
4answers
297 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
115 views

How to make a notebook take action whenever a particular symbol is defined or redefined?

For teaching purposes, I want to create a Mathematica notebook that will "notice" when the user defines or redefines a variable or function of a particular name, so that it can check the value and ...