# Tag Info

5

Here's an attempt at something like this: Dynamic@Row@{$sym, " = ", Symbol@$sym} Unprotect@FECacheTemplateAndUsage; FECacheTemplateAndUsage[sym_String] /; Context@arg == "Global" := ( $sym = sym; MathLinkCallFrontEnd@ FrontEndCacheTemplateAndUsagePacket[FrontEndInputNotebook[], sym, Null] ) The symbol name and its value is ... 5 In Manipulate >> Details and Options allowed forms of the second argument are listed: So HorizontalGauge[Dynamic[x], {0,10}] (or, for that matter, Slider[Dynamic[x], {0, 10}] or Checkbox[Dynamic[z]] or InputField[Dynamic[w]] etc.) is not allowed in the second (or later) argument. The highlighted row of the list is elaborated on as So using Row @ {... 5 The Animator object has a lot of internal controls that are a bit difficult to access. Another solution, if you don't need an Animator object, is to define your own. mouseSlider[max_,rate_] := DynamicModule[{running, i = 0}, Mouseover[ running = False; "not running", running = True; Dynamic[i += rate; {Slider[Mod[i, max], {0, max}], Mod[i, max]}]]] 4 I'm not sure what you exactly need but you might have better control using Graphics combined with frameless appearance? Button[Mouseover[Graphics[{Rectangle[]}], Graphics[{Black, Rectangle[], White, Text["Check", {0.5, 0.5}]}]], Print[10!], Background -> White, Appearance -> "Frameless"] 4 Dynamic[HorizontalGauge[Dynamic[x], {0, range}], TrackedSymbols :> {range}] Slider[Dynamic[range], {5, 50}] 3 Update: A function that adds axes that look like HorizontalGauge and VerticalGauge to an input graphics object: ClearAll[marker, addGaugeAxes] marker[rotation_: Pi/3, color_: Red] := Graphics[{Opacity[0], Disk[], Opacity[1], color, Rotate[SSSTriangle[1, 1, 1], rotation, {0, 0}]}, ImageSize -> 40] addGaugeAxes[xrange : {xmin_, xmax_}, yrange :... 3 An extended comment. I tried with: DynamicModule[{running = False, n = 0}, EventHandler[ Animator[Dynamic[n], {0, 100, 1}, AnimationRunning -> Dynamic[running] ] , { "MouseEntered" :> FEPrivateSet[running, True] , "MouseExited" :> FEPrivateSet[running, False] } ] ] But at least on Win10 v12.1 the internal timer ... 3 {default, hover, pressed} = Rasterize[Framed[Style["button ... ", 16], Background -> #[[1]], RoundingRadius -> 10, FrameMargins -> 15, FrameStyle -> Directive[#[[2]], AbsoluteThickness[5]]], Background -> None, ImageResolution -> 200] & /@ {{Yellow, Orange}, {LightBlue, Blue}, {LightGray, Gray}} Row[{... 3 Here is a very quick and dirty solution which takes advantage of the new molecule editor just recently added in 12.2 MoleculeGraph[MoleculeDraw[]] To make a graph, you can simply make a "molecule" where all of the atoms are vertices and all of the bonds are edges. And then use the built in MoleculeGraph function to convert it into a graph. Here's ... 2 Starting at least in M9, TogglerBar supports an Appearance option that produces a grid: DynamicModule[{idx = {}}, { TogglerBar[ Dynamic[idx], Table[i -> Graphics[{Blue, Disk[]}, ImageSize->20], {i, 12}], Appearance -> "Horizontal" -> {2, Automatic} ], Dynamic[idx] } ] where I show an image ... 2 This version will not produce any extra vertical space Manipulate[x, {{x, 0}, None}, Dynamic @ Column[If[x == 1, c1, c2]], Initialization :> ( c1 = {Control[{{x, 1}, {1, 0}}]}; c2 := {Control[{{x, 0}, {1, 0}}], Control[{{y, 0}, {1, 0}}]})] Its two states look like and Update Although the above solution using Manipulate to do everything ... 2 For the "output" window: nbout = CreateDocument[{}, WindowFrame -> "ThinFrame", WindowElements -> {}, WindowToolbars -> {}, WindowSize -> Medium, WindowMargins -> {{Automatic, 0}, {Automatic, 0}}, Deployed -> True, ShowCellBracket -> False]; and this will put "output" into this notebook$Post = Function[expr, ...

2

Update Another way! using Notebooks[] to list all the windows and then copy one of them to Export! Export["newCapture.png", copySomethingAbove, ImageResolution -> 400] See the picture as below! Original To control the resolution of image, we can use CreateDocument to creat a new notebook, then write some code and run. SetSelectedNotebook can ...

2

I think this is what you want. You can use the tracking function argument to Dynamic[]: SomeText = "SomeText"; (* I avoid starting vars with caps; so someText *) PopupMenu[ Dynamic[PS, (PS = #; StringForLater = (* Ditto: stringForLater instead of StringForLater *) If[PS == 0, StringJoin["Prefix", SomeText], ...

2

Your Manipulate's body (first argument) depends on x, y and dir. If any of them changes the whole body is reevaluated and rendered which means the EventHandler after the arrow key press is a new EventHandler, Graphics is also new so it is not surprising that the selection is lost and not restored sometimes. You can avoid this by making sure that only the ...

2

Please send a bug report to Wolfram Research (support@wolfram.com). Until you get a patch for your Mathematica version you could the following code ( I only tested it on Windows, but it should work on Mac and Linux, too, I think ): Manipulate[ EventHandler[ Grid[{{Pane[#, Alignment -> Center, ImageSize -> 222]& @ ...

2

(1) Rotate slightly and crop the image so that the tip of the tail is at the bottom-left corner and the tip of the snout is at the bottom-right corner of the bounding rectangle. (2) ImagePad to have the image on the upper part of the rectangle: seahorse = Import["https://i.stack.imgur.com/sRwYn.png"]; seahorse2 = RemoveBackground @ ImageCrop @ ...

1

Thanks again Carl Woll for the push in the right direction with pursuing ContentPadding further. It turns out that ContentPadding does allow using a Framed/Pane to tightly wrap an expression, including within a Grid, if you have a couple settings specified. Solution: First, I needed to specify Spacings->{0,0} explicitly, instead of using Spacings->0. ...

1

Here is a first attempt that should get you started: action[expr_] := Module[{old}, old = InputNotebook[]; SetOptions[old, Visible -> False]; With[{old = old}, CreateDocument[{expr, Button["Close", {NotebookClose[InputNotebook[]], SetOptions[old, Visible -> True]}]} ]] ]; DynamicModule[{}, Grid[{{...

1

This is probably what you want to do : DynamicModule[{x, y, inverted}, x = {a, b, c, d}; y = x; inverted = False; Column[{ Row[{"first", Spacer[16], Checkbox[ Dynamic[inverted, (y = Complement[x, y]; inverted = #) &]]}], Row[{"second", Spacer[6], CheckboxBar[Dynamic[y], x]}]}]]

1

Looks like this is a setting you can turn off. There is a similar post here that will probably work for you. I do not have an OSX machine to test this myself. Mathematica steals focus after finishing computation

1

You can use Dynamic on the variable to be localized in a DynamicModule: Clear[z1hyp, claim, \[Mu]0]; z1hyp[] := DynamicModule[{claim}, Manipulate[claim, {{\[Mu]0, 0, Dynamic@Control[{ {claim, "=", "Claim: \!$$\*SubscriptBox[\(\[Mu]$$, $$0$$]\)"}, {"=", "\[NotEqual]", "\[GreaterEqual]", ...

1

Not a solution, more of a funny bug in the Cloud (and a sign of how hard this may be) You might be best off writing your functions to post-process data in a regular-schmegular Cell

1

How about Manipulate[x, Control[{{x, 0}, {1, 0}}], Dynamic@If[x == 0, Control[{{y, 0}, {1, 0}}], Invisible[# &]]] or Manipulate[x, Control[{{x, 0}, {1, 0}}], Dynamic@If[x == 0, Control[{{y, 0}, {1, 0}}], ""]]

1

Great work on this post! While I've been under the weather I took your efforts and tried to see if there was a simpler way to achieve the same thing using the properties of the objects themselves vice an indexing scheme to make things a little easier. I don't know how well I did but here is some working code. R/ Andy dragDropM[Dynamic@orderedL_, objectL_] :...

1

You can also use CurrentValue["MouseOver"]: With[{s := Speak["warning"]}, Dynamic @ If[CurrentValue["MouseOver"], s, "text"]]

1

Animate[plotlist[[i]], {{i, 1, Dynamic[{i, alist[[i]]}]}, 1, Length@alist, 1}] can do the job.

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