Hot answers tagged

6

Example DynamicModule[ {value = 10}, Panel @ Row @ { Slider[Dynamic @ value, {1, 100, 1}, ImageSize -> Small], InputField[Dynamic @ value, Enabled -> False, ImageSize -> {36, 18}], Button["-", value--], Button["+", value++] } ] Output EDIT In order to restrict Slider to a set of pre-defined values, please see ...


5

Based on the documentation, Slider is the only control object used in your code that supports a list of expression as its settings. Here is a custom alternative. DynamicModule[{list = {0.001, 0.0025, 0.005, 0.006, 0.007, 0.008, 0.009, 0.01}, l}, Row[{ Slider[Dynamic@l, {list}], Spacer[5], InputField[Dynamic[l, If[MemberQ[list, #], l = #] &], ...


4

The problem is with Animator. When it is passed a list, the +/- buttons increment the index of the setting by about 5-10%. It seems to pick a "nice" increment that is 1, 2 or 5 times a power of 10. When the length of the list is less than 10, it does not behave well. It seems that an increment of 0 is what is sometimes calculated. (Personally, I would ...


4

I suppose the it is expected and it happens because after prompting a DialogNotebook the evaluation of Module is finished and a Temporary attribute of its variables is kicking in. Why the first example works the second doesn't? I don't know but how a Temporary attribute works is not documented well. One way to make it work is to use kernel blocking ...



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