Tagged Questions

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

learn more… | top users | synonyms

5
votes
1answer
181 views

Why does Dynamic output cause CPU usage when onscreen?

I write such a line in Mathematica: {Slider[Dynamic[s]], Dynamic[f[x_] := s*x]} After evaluation, the CPU immediately runs at full power. And if you scroll the ...
8
votes
5answers
406 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 ...
2
votes
1answer
232 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 ...
5
votes
2answers
366 views

Interactively select a row/column of a Grid

I need a simple way to display tabular data (preferably with Grid) and also be able to select a row or column of the table. I've tried different approaches, but I ...
4
votes
1answer
190 views

Dynamically link cell content in Mathematica?

Is it possible to dynamically link the content of two cells? For example, can I set up a Notebook with two text cells that display the same value, and if the user types in one the other updates, etc.? ...
18
votes
1answer
202 views

“With” as part of the “Dynamic Interactivity Language”

I noticed that in Mathematica's Function Navigator With is listed as being part of the "Dynamic Interactivity Language". It is not the first (or even the fourth, ...
30
votes
9answers
4k views

How to create animated snowfall?

Well, the title is self-explanatory. What sorts of snowfall can we generate using Mathematica? There are two options I suggest to consider: 1) Continuous GIF animations with smallest possible number ...
2
votes
1answer
89 views

How do I make an EventHandler non-responsive to MouseMoved after a mouse click?

Consider the following code. After evaluating it, when I move the mouse over the output text, it prints 1, and when I click the mouse on ...
29
votes
1answer
329 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 ...
1
vote
2answers
235 views

How to make a Tooltip display dynamic based on a parameter value?

If k=3, then I would like the following to say "Sine Curve, k=3" when you hover over the output of the Tooltip command: ...
2
votes
3answers
154 views

How to change FieldSize to be the same as dropdown menu width in PopupMenu?

I've tried the following code to change the FieldSize but I can't make it equal the actual value of MenuSize and I tried to ...
1
vote
2answers
131 views

How to edit InputField while using EventHandler?

I try to edit InputField while using EventHandler's MouseClicked, but the ...
7
votes
2answers
279 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. ...
21
votes
3answers
862 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 ...
1
vote
1answer
130 views

Changing the number of locators with SetterBar

Typically when adding locators I would use a button i.e. something along the lines ...
13
votes
1answer
232 views

Why does a variable become real when using the second argument of Dynamic?

Version 9, on Windows 7. Please compare these 2 very simple examples Manipulate[ x, Row[{Manipulator[Dynamic[x], {0, 10, 1/100}]}], {{x, 1}, None} ] and ...
4
votes
2answers
162 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 ...
2
votes
1answer
155 views

How to control dependent PopupMenus?

I created three interdependent PopupMenus with names demographic, region and ...
6
votes
3answers
333 views

Simple blink comparator for two images

I tried to build a simple 'blink comparator' - where you can click on an image repeatedly to switch between two similar images. (An old-fashioned notion in the days of powerful image processing ...
7
votes
1answer
198 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 ...
4
votes
1answer
262 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 ...
4
votes
4answers
144 views

Make a slider controlling a generated character's code value

If I execute the following code: char = 97; Slider[Dynamic@ToExpression@FromCharacterCode@char, {0, 5}] the slider will fail to change the value of ...
21
votes
2answers
823 views

Why animator smoothes dynamic updates, or how to make pacman drink beer

How could I make a pacman drink beer in Mathematica? This is what I have so far ...
6
votes
1answer
201 views

Dialog inside Dynamic Module

The following doesn't appear to work: DynamicModule[{}, Button["Press Me", ChoiceDialog["OK or Cancel?"]]] When I press the button labelled "Press Me", a dialog ...
9
votes
2answers
278 views

Localizing variables within a Manipulate

I have a notebook with several examples of very similar computations, each involving the same variable/parameter names of the ingredients used in a final ...
5
votes
1answer
350 views

Progress indicator with shared variables

I'm trying to create a custom progress indicator for a parallelized computation, using Dynamic and SetSharedVariables to display ...
12
votes
2answers
753 views

How to extract the numerical value of a dynamical variable

I want to inspect interactively an image by selecting points by the mouse pointer. This is easily done by LocatorPane - here is a simplified example: ...
4
votes
3answers
206 views

How can I create a custom control which evaluates to a list of values or replacements?

I have a set of variables which are used in various places in my calculations (solving a system, initial conditions, etc.). In order to make this easier to deal with, I want to make a control-like ...
4
votes
1answer
220 views

Cannot calculate with Dynamic variables in a grid

This is a prototype of a grading scheme. In reality it is bigger. The 10 pts in initPtsPartA comes from the school. The output cell should be deployed as a CDF ...
10
votes
2answers
292 views

Mathematica Typing Effect

Here is a Typing Effect in javascript. I could only implement a very simple one: ...
6
votes
3answers
344 views

Locators in Manipulate not moving properly

I thought a simple Mathematica kerning machine (for adjusting the space between characters) would be interesting, but I'm having trouble with the locators. (There are a number of other questions ...
10
votes
2answers
282 views

Dependent Manipulate sliders

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

Updating a tracked symbol inside Refresh?

I have some code inside a Manipulate, whose goal is to allow the user to edit the upper half of the matrix while keeping it symmetric at all time. The minimal code ...
3
votes
1answer
185 views

Having Dynamic evaluated when off screen

As the title says, I want a cell containing the dynamic solution of a DAE-System to be available over the whole document. I use a lot of different Plots and Sliders scattered over the document and it ...
1
vote
2answers
603 views

Manipulating PlotRange

Currently, I am working with some dynamic simulations of mechanical/electrical systems (in this case a kitchen scale). The main simulation is running smoothly but while building a nice GUI around the ...
9
votes
2answers
177 views

What is the point of Refresh if Dynamic has an UpdateInterval option?

I haven't found an example where I can't get rid of Refresh[]: ...
2
votes
2answers
126 views

How to display only a certain part of the content in a Panel?

I have a Panel of size {850, 400} as myPanel with a Pane of size {450, 400} and four images ...
6
votes
1answer
316 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: ...
3
votes
1answer
151 views

How can I allow a user to input a list using parentheses and convert this to Mathematica notation dynamically?

I have the following dynamic module. It works. The problem is that whenever I try to make the variable list or the variable s dynamic the code doesn't work. My goal is to allow students to enter a ...
8
votes
1answer
552 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 ...
0
votes
0answers
66 views

How to create a dynamically self-updating table of content for a notebook? [duplicate]

Possible Duplicate: Generating a table of contents How to create a dynamically self-updating table of content for a notebook? The TOC should contain the titles for the section, subsection, ...
6
votes
2answers
274 views

A good way to manage code in a complicated CDF?

When doing complicated programming in a Mma notebook I define several functions that I use in my higher level funtions, and I use a "Subsection" cell for each definition. For example I might write: ...
6
votes
2answers
309 views

A command for outputting a list of parameter values in a Manipulate interface

I am looking for a command that will output a list of values that correspond to the current parameter values manually set on a particular Manipulate interface. For ...
4
votes
1answer
428 views

Emulating a button push or a mouse click with Mathematica code

I need to perform a long action with a button. I tried setting the DynamicEvaluationTimeout, but it seems it doesn't work for me. So I want to try using several ...
2
votes
1answer
226 views

Defining a function that handles Dynamic arguments similar to Built-ins

Firstly please note that I'm using simply Dynamic behavior to illustrate my question, I'm not asking how to move a Disk or make ...
5
votes
1answer
398 views

Enabled option for slider in Manipulate not updating dynamically

In a Manipulate expression I have a slider control which has the Enabled option ...
7
votes
3answers
254 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 ...
5
votes
1answer
276 views

“Masking” an InputField

In building an assignment for my class, I would like set up an InputField, where they will enter a function. I was wondering if there was a way to "continuously" check if their function is being ...
4
votes
2answers
182 views

How to set the timeout of the preemptive link?

I apologize if this is a RTFM question, but I couldn't find this in the docs. How can I set the timeout of the preemptive link? For example: ...
7
votes
1answer
189 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 ...