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

learn more… | top users | synonyms

8
votes
1answer
166 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
355 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, ...
8
votes
1answer
350 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
2answers
562 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: ...
7
votes
3answers
247 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
3answers
176 views

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

Please take a look at following toy example: ...
7
votes
2answers
267 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
2answers
215 views

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

Consider the following snippet as a reference. ...
7
votes
2answers
370 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
178 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
3answers
448 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 ...
7
votes
2answers
170 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
191 views

Prevent interdependence of controls

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

Want Interactive PlotRange of Graphics[{}]

I am trying to do: ...
7
votes
1answer
230 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
1answer
251 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
337 views

How to create a multi-selectable setterbar with colored buttons

Background: consider the following code-snippet. ...
7
votes
1answer
357 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
1answer
195 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 ...
6
votes
3answers
324 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 ...
6
votes
2answers
642 views

Formatted text in a Dynamic or Manipulate control

I am using a Manipulate control to show different calculations for the same user-specified parameters. I would like to show the results for the calculation the ...
6
votes
2answers
259 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 ...
6
votes
3answers
316 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 ...
6
votes
2answers
422 views

How can I make a list animation of images that fade in and out?

I'm not sure how to get a "fade in" effect.
6
votes
3answers
192 views

Displaying a locator that moves smoothly and updates some dynamic variables

I want to select a point on a graph and display a function of the coordinates value. Asking here a related question I learned to use Setting. Consider the example, where I display the coordinate ...
6
votes
2answers
224 views

Manipulators and Dynamic in more concise code

Is there a way to update dynamic variables through a function. I was looking back at one of the answers from Heike where she showed me how to make my custom ...
6
votes
3answers
368 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: ...
6
votes
2answers
265 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
118 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 ...
6
votes
1answer
290 views

Efficient dynamic drawing

So for example I have this code: ...
6
votes
1answer
288 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: ...
6
votes
2answers
131 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 ...
6
votes
2answers
179 views

How to access off-cell mouse position inside an EventHandler?

Consider the following example. First, I print the dynamically updated value of the actual position of the mouse, then I print pt, which is the same but is only ...
6
votes
2answers
193 views

Creating a slider that instead of setting, increases/decreases a variable

The objective: Create a slider that, when displaced from the center, increases-decreases the value of another variable at a rate proportional to the displacement. So, I create a slider that ...
6
votes
1answer
247 views

LocatorPane and multiple EventHandlers, PassEventsDown option

Consider the following piece of code from Heike as an ( accepted ) answer on LocatorPane, selecting multiple Locators - Basically the code implements dragging polygons on a LocatorPane. ...
6
votes
1answer
756 views

How to make a dynamic stopwatch?

For some experiments I need some basic timer function. I tried various methods, and neither of them are fully satisfactory. What I need is a button, that starts/stops a timer, resets timer with each ...
6
votes
1answer
154 views

How can I make sure all InputFields have values before processing a nb form?

This is a two part problem: I have a form that accepts both numeric and text inputs, then runs a function using a "process" Button. The issue I'm having is users that forget to fill out all of the ...
6
votes
1answer
185 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 ...
6
votes
1answer
146 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 ...
5
votes
3answers
165 views

Creating a Tooltip that knows what platform is currently being used

I have Mathematica 8 on my PC. I also have a new Mac with CDF-player, but not Mathematica. I want a Tooltip that shows one thing if running on a PC, and something ...
5
votes
3answers
329 views

How do you properly create Buttons to change dynamic variables using Table

In this example, I want a series of four buttons to change the value of a variable that is used dynamically to drive a plot. I am trying to figure out why using Table around the buttons causes a ...
5
votes
2answers
734 views

Equivalent of MATLAB's “hold on” function

I'm making an animation where the number of iterations is known. I tried using Dynamic, as I prefer updating in real time over generating data before plotting. I ...
5
votes
2answers
185 views

How to make DynamicModule work without an extra ENTER

I've been trying to learn more about DynamicModule (I do not use them, as I used Manipulate all the time). After some time ...
5
votes
3answers
269 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
271 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 ...
5
votes
2answers
247 views

Creating a list of PopupMenus that dynamically update an element in a list

So as the title says I am trying to make a list where each element is determined by a users choice of an element in a PopupMenu. My first attempt: ...
5
votes
1answer
179 views

How to add several Locators to a Graphic with a mouse click?

Background: Suppose I have something like this: ...
5
votes
2answers
265 views

How to dynamically update Locator[] constraints?

I need to visualize Menelaus' theorem for a triangle with moving locators for each of six points. So the vertexes of the triangle can move in any possible way, and the three points on the sides of the ...
5
votes
1answer
179 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 ...
5
votes
1answer
282 views

Basic question about Dynamic

Please consider the following: ...