Questions on using or implementing UI control elements that link a mouse click to a single action.

learn more… | top users | synonyms

1
vote
1answer
65 views

How insert hyperlink to file with relative path?

Into a text cell of my current (previously saved) notebook, I want to place a hyperlink to a particular file target.html in a particular subdirectory ...
6
votes
4answers
471 views
10
votes
1answer
108 views

Evaluation leak from Dynamic in Button's action

a = 1; Button["Print", a++] Button["Print", Dynamic[a++]] Button["Print", Dynamic[a++];] Button["Print", {Dynamic[a++]}] Dynamic @ a The second ...
1
vote
1answer
81 views

Click individual selections from a button

I have a graphic where each Arrow, Rectangle, and Text is a ...
8
votes
2answers
224 views

How to paste an equation to a graphics

I wonder why PasteButton["Plot", Plot[\[SelectionPlaceholder], {x, 0, 10}]] applied to x^2 --- highlighted --- doesn't work.
2
votes
0answers
58 views

Buttons in graphics

I've created a workflow using Drawing Tools. It consists of Images, lines, and in some places I have cut and pasted Button objects. These buttons work fine if you paste directly into the Graphic frame....
6
votes
2answers
125 views

How to horizontally center a button in manipulate?

I just need to center a button in the MWE code below. Currently, all I try doesn't work. I would like to horizontally center the button relative to the sliders over it, for aesthetical reasons only. ...
1
vote
1answer
40 views

Button to close cells

I want to have a button that closes cells with a specific tag. The following code does what I want: ...
3
votes
2answers
81 views

Table of Buttons [duplicate]

What's the correct way to form a table of buttons in which each action depends on the index in the table? E.g., I want to get {Button[1,f[1]],Button[2,f[2]]} ...
2
votes
2answers
72 views

Question about Slider and adding buttons

I would like to add some buttons next to a slider for higher accuracy movements. For instance I have this slider, which has 1-step, pretty easy to use. ...
1
vote
0answers
27 views

Manipulate panel does not print (or print to pdf) the same as it displays in a notebook [duplicate]

Whenever I print (or print to pdf) a manipulate panel it never looks like the manipulate panel I have in the notebook on my display. This is what the manipulate panel looks like on my display. ...
4
votes
2answers
160 views

In 10.3 System DialogInput execution error

I have upgraded to 10.3 from Mathematica 9.0. However, in 9.0 things that ran well will not run in 10.3. A typical example is: ...
2
votes
1answer
94 views

Function under Button, need help [closed]

I would like to put this function under button so I can just press button to evaluate instead of having to shift+enter ...
-1
votes
1answer
49 views

Display that replaces previous values [closed]

Is it possible to make some function like Print but one that replaces its previous result with a new value instead of producing a new one? For example, let's use ...
3
votes
0answers
43 views

Changing the format of ActionMenu

I am attempting to make my actions menus "prettier". :) Using the code below... ...
0
votes
0answers
22 views

Is it possible to create a button that shows another button on Manipulate[ ] function? [duplicate]

I want to create a program which allow us to choose an option, and depending on the choice, it may show new options. I want to apply this concept with buttons on a ...
3
votes
3answers
132 views

Making a Button smaller in width

I can't seem to figure out how to make the width of a Button smaller. I tried change the first 26 below to a number like 10. But it doesn't seem to effect the ...
1
vote
1answer
179 views

Why are some Buttons not working in CDFPlayer?

I have two Buttons within a single panel. My problem is that after deploying that panel, the second Button is not working in the ...
-3
votes
1answer
120 views

Error in Manipulate [closed]

I am trying to create a button which will give random values for certain parameters. I am using the following in Manipulate[]. ...
2
votes
2answers
89 views

PasteButton: Pasting expression name without quotation marks?

I am struggling to find a way to use PasteButton to paste the name of an expression (in particular a list) without showing the contents of the expression or without ...
22
votes
4answers
606 views

How to Initiate a queued evaluation from a Dynamic GUI without using a Button

I have a Dynamic-based GUI, and one part of it will kick off a calculation that could take longer than the default 5-second dynamic timeout. I know that ...
4
votes
0answers
56 views

Evaluate cells error in Mathematica

Clicking on the button generated by the following code: ...
5
votes
1answer
89 views

How to make a cell highlight on mouse down?

When a cell has WholeCellGroupOpener set to True, it becomes a clickable button that toggles its cell group open and closed. How can I make the cell change color ...
0
votes
1answer
54 views

Button for sqrt sign

How to create a button, which has exactly the same functionality as pressing ctlr+2 in an inputField? So it is basicly appending an sqrt sign to a string.
3
votes
1answer
105 views

Preventing a Print expression from generating a new cell each time it executed [duplicate]

In reference to the following code: Button["Start", Print[Plot[x^3, {x, -1, 1}]]] When I click on the button the first time, I get a plot of $y = x^3$, perfect. ...
1
vote
1answer
68 views

Update an application on the click of a Button

I am finishing my first program in Wolfram Mathematica 10 and if I have almost completed is essentially thanks to this valuable forum soon where I will try to help too. Basically, now I have this ...
4
votes
1answer
44 views

Pressing a Button aborts the evaluation [duplicate]

I'm doing a program in Mathematica 10 and I need to use different buttons like Button["Start", Module[{}, 'routine']] It all works wonderfully when the routine ...
1
vote
1answer
48 views

Construct a button to start a routine [duplicate]

When executing Button ["Print" Print[1]] you get a button that, if pressed, prints to the screen 1. What I would like to have is ...
3
votes
1answer
63 views

Extending Button's Method -> “Preemptive” 5 second timeout

This is an example from the documentation for Button : ...
3
votes
2answers
139 views

How do I make a Graphics3D Object act as a Button?

The original idea is from: http://demonstrations.wolfram.com/ClickACountry/ What I'm trying to do is to create a series of Graphics3D objects and let them control the display of corresponding ...
1
vote
4answers
96 views

Slider for different plots

Hi I've got 12 different plots and I want to be able to cycle through them with a slider, however, none of the options for manipulate or slider seem to be able to handle multiple plots. My parameter ...
4
votes
0answers
46 views

How to make a button that allow me to control a Manipulate module? [duplicate]

I'm trying to use button that allow me to control a manipulate module. Here's what I did now, it's really simple: ...
3
votes
2answers
120 views

How to show and hide text by a button

I'm trying to implement a button that can show and hide output text in a panel/tab, but I can't find a specific command to do that. I tried StringReplace, but it doesn't work for me.
2
votes
2answers
95 views

How to combine Toggler and Button?

The Play function defines a toggle button to start and stop: I'm trying to emulate that, but with a single button. I feel like this is a common enough task that this question should be answered ...
8
votes
2answers
378 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: ...
1
vote
1answer
151 views

Interfaces: Importing files, processing them and exporting the results

We have a simple interface with two import file buttons, one field to enter a number $x$, one field to enter a file export name, and one 'Run' button. The mathematical operation when hitting 'Run' ...
2
votes
2answers
63 views

How do I size 'Button' controls to closely bound a single character?

I have a button containing a single character, generated with, for example Button["X", Null] but that is by default much wider than it should be: I want the ...
1
vote
1answer
70 views

Button for expanding a cell? [duplicate]

How can I create a button which sits next to the cell, like so: http://i.imgur.com/ZFkgn5q.jpg When you click the button it expands the cell, like this (note the cells on the right): http://i.imgur....
2
votes
2answers
168 views

Updating Manipulate output from within a Button

Consider this (edit: Pause[3] represents some long computation the button should do): ...
1
vote
1answer
136 views

Implementing a back button (in CDF)

I have a rather large notebook, which contains a lot of hyperlinks to different parts of the notebook. Is it possible to make a back button (maybe as a docked cell button?) so that when a reader ...
4
votes
2answers
132 views

Write GUI to select spheres in a grid

I'd like to generate a code that: 1) starts with a grid of circles (in general, it won't be a square grid) 2) allows the user to choose some of those circles 3) allows the user to choose the type of ...
0
votes
0answers
87 views

Can I reach a breakpoint when I press a button and call a function?

I have a function and inside it I put a breakpoint on the first instruction in the function. I made a Button which calls the ...
4
votes
1answer
103 views

Getting the Box of a Button

I have a useful snippet of code that I use for anything in my Notebook that takes a while to execute and doesn't need to be executed for subsequent cells: ...
2
votes
0answers
174 views

Button to run a group of cells

I'm not sure how to create a minimal working example since I don't know how to post code that appears as cells but hopefully my question is simple enough that it won't be necessary. My apologies all ...
5
votes
1answer
136 views

In Graphics, a button without action will not work?

A minimal example: Graphics@Button[Disk[]] will yield error message Button is not a Graphics primitive or directive. But if you drop ...
2
votes
1answer
80 views

Button action preventing parallel execution?

I couldn't find a better title, so I'll jump straight to the example! There is this long list of slow jobs to be executed in a parallel way, at the press of a button: ...
6
votes
2answers
138 views

Showing “updating…” message while Manipulate is re-evaluating

Is it possible to show a fixed text such as "updating..." instead of the last result shown, when Manipulate is re-evaluating an expression (in a slow evaluation ...
4
votes
3answers
254 views

Using Mouseover to change the appearance of a button without writing the button specification twice

When I code in Mathematica, I often find myself having to repeat large chunks of code for a function to work. The latest example of this is a color changing button that prints when clicked, code shown ...
3
votes
2answers
104 views

Running “Animate” Using a Button

I made the button below for launching an Animate, but it doesn't work at all! Why? ...
1
vote
3answers
146 views