Tag Info

Hot answers tagged

4

This Answer is based upon Kuba's comment above regarding two InputFields, so credit should go to him for the idea, this is just an implementation. However, the problem interested me because I have a similar issue to solve regarding entering units into answers, and this question and Kuba's comment made me think of a related solution to that. One can use ...


4

There are a number of issues here: There is no need to wrap Dynamic around the inner variables of the final input field expression. Indeed, it is harmful as Dynamic is purely a user interface element and acts as a holding wrapper in any other context (like an arithmetic expression). The use of Function in the output expression will cause the variables x ...


3

This is how I'd do that: DynamicModule[{coords, edges, lines, centers, locators}, Dynamic[ Graphics[{ GraphicsComplex[coords, { {Line[edges]}, {Darker@Red, PointSize[0.02], Map[Point, Range[5]]}}] , MapIndexed[locators, lines] } , ImageSize -> 400, Frame -> True, PlotRange -> 2] , None] , Initialization :> ...


3

This measures frame rate using simple Manipulate that does very little computation other than calculating FPS and then display an image. It finds fps as number of refreshes made so far divided by number of seconds elapsed. I did not use a moving average here, just kept a record of the number of times Manipulate is called and the time since start. This ...


3

I reported this to WRI tech support on March 9th and, finally received an answer today. As I promised in a comment to the question, here it is (somewhat edited). My apologies for the delay in getting back to you. Just wanted to let you know that I was unable to find a resolution for this issue and have forwarded an incident report to the ...


2

After some significant time browsing related questions on this site as well as trial and error, I believe that I have managed to create a solution for what I was trying to accomplish. Taking the advice from Ariel I have essentially created my own custom array of checkboxes that do not experience any major delay when one of them is clicked. I have ...


2

I think your requirement is not correct for the user. What should display on the screen should match the current x+y value based on what is currently selected for x and y and not what was there before. If you keep the old value displayed, then the new selection do not match what is on the screen and that can be confusing. But I made two versions, and you ...


1

Your code creates the following Locators, as stored in the Front End in its box form: {LocatorBox[ Dynamic[$CellContext`betweenPnt[{1.08, 0.94}, {1.08, 0.036}, 0.5]]], LocatorBox[ Dynamic[$CellContext`betweenPnt[{1.08, 0.94}, {0., 0.97}, 0.5]]], LocatorBox[ Dynamic[$CellContext`betweenPnt[{1.08, 0.036}, {1.94, 0.49}, 0.5]]], LocatorBox[ ...


1

The behavior you describe is the normal behavior for expressions displayed dynamically. For example, if you create a 3D graphics object, evaluate it, rotate the object in the output image with the mouse, and delete the output, when you re-evaluate the 3D graphic, the new output image appears in the rotated position of the deleted image. To clarify the ...


1

This accepts a plain number or "E" format or "*^" notation.. ClearAll["Global`*"]; SetAttributes[sciInput, HoldFirst]; inst[numstring_] := InputField[numstring, String, FieldSize -> {20, 1}, FieldHint -> "enter a number"]; sciInput[result_] := DynamicModule[{sig, nn}, ...


1

Ah, the answer was preempted by @rm-rf and more technically confirmed by @Kuba, but I didn't quite understand in the way that they worded things. So allow me to rehash their comments— You can't edit anything within Dynamic. Any appearance of editing, is only that: an appearance. To see this for yourself, input Dynamic[bar] and highlight the a in the ...



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