Tag Info

New answers tagged


Ad i. PasteButton[RawBoxes @ "myList"] Ad ii. I've put there a fixed size of the window and additional pane to scroll through Ad iii. Prepare plot button opens a dialog to pick lists to plot. You can pick one or two, if two are picked then Transpose@{list1, list2} is used. I'm not checking correctness of the input. CreateWindow[PaletteNotebook[ ...


Intro One day I was playing with Developer` package and found DateSetter which uses some kind of floating elements that I found useful. After taking a look at a source code I found out it was FrontEnd`AttachedCell. From the code one could learn enough to create something useful: Usage FrontEnd`AttachCell[ parentObject, (*Box or Cell ...


Provide name as a String and use one of those methods to assign the value: How do you programatically load data into symbols? Manipulate[x, {{variablename, "test", "variable name"}, (InputField[#, String] &)}, {{x, x1, "value"}, ControlType -> InputField}, Button["save", ToExpression[variablename, StandardForm, Function[name, name = x, ...


This will work so long as you don't try to assign a variable that already has an assignment Manipulate[x, {{variablename, defaultname, "variable name"}, ControlType -> InputField}, {{x, x1, "value"}, ControlType -> InputField}, Button["save", Evaluate[variablename] = x]]


I think this works, unless I have misunderstood the requirements: Manipulate[ TextCell["WindowSize: " <> ToString[xwin]], {intv, IntervalSlider[#, {0, 100, 1}, MinIntervalSize -> xwin, Method -> "Push"] &}, {xwin, 5, 50, 5}]


A simple example of one popup depending on the selection of another: DynamicModule[{x, y, list}, {PopupMenu[ Dynamic[x, (x = #; list = Switch[#, "A", {1, 2, 3}, "B", {4, 5, 6}, "C", {7, 8, 9}]; y = First[list]) &], {"A", "B", "C"}], Dynamic[PopupMenu[Dynamic[y], list], TrackedSymbols :> {list}]} ]


From my comment: The problem is that with ContinuousAction -> True is that the input 1.0 is immediately converted to a number and displayed, the number being the real number one. The number one is displayed automatically as 1., which removes the 0 from the InputField. I seriously doubt there is a way to hack InputField in a way that it will work in CDF. ...


Here is a possible coding for the next step: DynamicModule[{x = 0, s = 6, bkgs}, col1 = Lighter@Lighter@Green; col2 = Lighter@Lighter@Blue; col3 = Lighter@Lighter@Red; bkgs = Table[col1, {s^2}]; Grid@Map[Button[ToString@#, x = #, Background -> Dynamic[ If[bkgs[[#]] == col1, If[x == #, bkgs[[#]] = col2, ...

Top 50 recent answers are included