Skip to main content
25 votes
Accepted

Programming the fiver game

In this case I don't know how to post something helpful without providing full code so I'll just do that and hope this wasn't homework. My emphasis is on clarity (hopefully) rather than brevity or ...
Mr.Wizard's user avatar
  • 273k
25 votes
Accepted

UI performance with large image data

A lot can be tweaked, but it is hardly ever straightforward: ...
Kuba's user avatar
  • 137k
23 votes
Accepted

How to write a drag-n-drop reorderable gui?

Here is a very crude first implementation (code at the bottom): (note that the updated version is called as `dragDropList[Dynamic@l) Some notes: The black box serves both as insertion marker and as ...
Lukas Lang's user avatar
  • 34.4k
21 votes
Accepted

Minesweeper: How to Dynamic a lot of graphics with high-speed?

The issue with such multicontroller dynamic interfaces is that one usually wants to store the state of all controllers in one variable for convenience (e.g. store status of position ...
István Zachar's user avatar
19 votes
Accepted

Creating a simple Dock Cell that Fades In when Cursor Hover Over It

Edit: Fading overlay window In order to get a top dock element with real transparency, one can create a window that overlays the current notebook window and adjusts its position together with it. <...
Karsten7's user avatar
  • 27.5k
19 votes

How to write a drag-n-drop reorderable gui?

I once approached this. I never finished it so let me know if you face any issues: ResourceFunction["GitHubInstall"]["kubapod", "mgui"] << MGUI` And here ...
Kuba's user avatar
  • 137k
18 votes
Accepted

Visually permute rows of a matrix via mouse dragging

EDIT: converted the use of explicit Hold wrappers to appropriate HoldAll and HoldFirst ...
glS's user avatar
  • 7,733
17 votes
Accepted

Working with DynamicModule: SetDelayed + OwnValues

J. Fultz' answer indicates that it is not a bug but a feature which needs better documentation. Get a habit of defining your procedures with [], e.g. ...
Kuba's user avatar
  • 137k
17 votes
Accepted

Allow multiple GUI elements to react dynamically to interaction with a single element

n = 120; names = Range[n]; pts = AssociationThread[names -> N@CirclePoints[n]]; edges = RandomSample[Subsets[names, {2}], 250]; There are two reasons why ...
Kuba's user avatar
  • 137k
17 votes
Accepted

PerformanceGoal option ignored in V11.1

The quick fix is to use Block: ...
Kuba's user avatar
  • 137k
17 votes
Accepted

Animating a Potential Function (eigenfunctions of Laplace's equation)

The fix is to move Animate outside of LocatorPane, but let's go couple of steps further: I turned Eigenvalues procedure into a ...
Kuba's user avatar
  • 137k
13 votes

Button action monitored with progress bar

Building on Kubas code here is an alternative which solves some (minor) problems: it will not leave behind scheduled tasks when the abort button is used, it works equaly well when the Alt+. shortcut ...
Albert Retey's user avatar
  • 23.6k
13 votes
Accepted

How to create Right-Click ActionMenu at mouse position?

Both solutions are undocumented but I don't think they will go away. Menu/MenuItem are used internally for a long time and ...
Kuba's user avatar
  • 137k
13 votes

How is the zoom tooltip in the "Coordinates Tool" implemented?

Here's a proof-of-concept demonstration of how to build your own tooltip with reasonable performance: ...
Lukas Lang's user avatar
  • 34.4k
12 votes

Guidelines for planning custom GUI in Mathematica

Things to keep in mind when developing complex GUI in Mathematica: Wolfram System general issues: Styles management/inheritance system (StyleSheets and friend) It is complicated, full of exceptions ...
11 votes
Accepted

How to access "Choose Color Scheme" Programmatically

Do you mean ...
Karsten7's user avatar
  • 27.5k
11 votes

How can I get a FileNameSetter-like dialog inside my own custom dialog?

Not perfect but a good start. Openers expand/collapse trees but it does not affect the preview pane. Clicking on the directory name does. ...
Kuba's user avatar
  • 137k
11 votes
Accepted

VoronoiMesh as a TogglerBar

Here are implementations for a MeshTogglerBar and MeshSetterBar based on my answer here (code below). Both implementations use <...
Lukas Lang's user avatar
  • 34.4k
11 votes
Accepted

Using graphics primitives as buttons

It might be easier to build your own button using EventHandler and CurrentValue: ...
Lukas Lang's user avatar
  • 34.4k
10 votes
Accepted

switch between automatic and manual updating

Edit Can you think of another way to accomplish the same thing [...]? It would be nice to have a solution that didn't involve duplicating each slider. -nibudd ...
Kuba's user avatar
  • 137k
10 votes

Constraining locators in a locator pane to a specified data set

Use Nearest[]: ...
J. M.'s missing motivation's user avatar
10 votes
Accepted

Create dynamically Manipulate buttons to come back to current parameters

Here's my go at it. I used a SetterBar with a Dynamic list of presets, since it implements a ...
Michael E2's user avatar
  • 241k
10 votes

VoronoiMesh as a TogglerBar

...
kglr's user avatar
  • 399k
10 votes
Accepted

Fit text within a button

The following should work well for ordinary text, without any magic numbers or rasterization tricks required: ...
Lukas Lang's user avatar
  • 34.4k
10 votes

How is the zoom tooltip in the "Coordinates Tool" implemented?

Answering the first part of my question (thanks to Lukas Lang for pointing me in the right direction!). The source code for the Image Assistant Toolbar that appears when you select ...
Alexey Popkov's user avatar
9 votes

Programming the fiver game

Here is a version that uses only the Front End, which can be verified using LinkSnooper. This is mostly a useless optimisation/exploration. ...
Jacob Akkerboom's user avatar
9 votes

Generating graphs interactively (GUI)

IGraph/M 0.6 includes IGGraphEditor[], an interactive editor for creating graphs. Here's an example of it in use: This project is still in experimental stage, and ...
Szabolcs's user avatar
  • 236k
9 votes

VoronoiMesh as a TogglerBar

...
MarcoB's user avatar
  • 67.6k
9 votes
Accepted

How to make a Locator3D/LocatorSphere?

Here's something to get you started with a new design. First we make the function that actually makes a DynamicModule. It supports having more than just a sphere ...
b3m2a1's user avatar
  • 47k
9 votes
Accepted

Dynamically Center a Control in Manipulate

We make plot image size a control variable and use the (undocumented) Method option "ControlAreaDisplayFunction" to ...
kglr's user avatar
  • 399k

Only top scored, non community-wiki answers of a minimum length are eligible