7

It's a very broad question (too many controls, options, etc.), but one can find out what the output is equivalent to like this: Manipulate[x + y, {x, 0, 9, 1}, {y, 0, 90, 10}] // MakeBoxes[#, StandardForm] & // First // ToExpression // InputForm (* DynamicModule[{ x = 0, y = 0, Typeset`show = True, Typeset`bookmarkList = {}, Typeset`...


6

The most general solution is to do the whole layout yourself. You can actually use Control and put the controls themselves in the Grid along with your output. So you will have only ONE grid, which now includes everything in it. Both the controls and the final output of your Manipulate code. This gives you full control of what you want to do. For your example,...


4

The following function will collect all currently open and unsaved notebooks and place their content in a new notebook. The contents from each unsaved notebook are grouped by a "Section" cell bearing the name of the notebook it came from. Any existing "Section" cells are downgraded to "Subsection" to make the result more tidy. ...


3

What you are showing can in principle work, under two conditions: You need to have the Begin[…] and End[…] parts in different cells. If you do not, the symbol x is already resolved to Global`x before the context is changed. This is because as a first step, the entire cell contents are converted into an expression using MakeExpression. Only then are the ...


2

Change your logic to If[(! use) && prevUse, sli = 1]; prevUse = use;. This will make sure you reset sli only on True -> False transition of use. Manipulate[ If[(! use) && prevUse, sli = 1]; prevUse = use; sli, Dynamic@Grid[{ {"Consider option 3", Control[{{use, True, ""}, {True, False}}]}, {"Options"...


2

We can also use the (undocumented) Method option "ControlAreaDisplayFunction" with a custom function that gives the desired look: ClearAll[controlAreaDisplayFunction] controlAreaDisplayFunction[side_: Right, itemsize_: Automatic, alignment_: Automatic, spacings_: Automatic, style_: GrayLevel[0, .2]] := Grid[{{ Item[#, ItemSize -> itemsize ...


2

Note: This solution is heavily based on the one by @Nasser, this is just to show how to make better use of Manipulate. Here's how I would do it: Manipulate[ Grid[ {{ Grid[ {{"x", Control[{x, 10, 100, 1}]}, {"y", Control[{y, 10, 100, 1}]}} ], Item[ Dynamic@Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}], ...


2

You can take advantage of $CellContext` and the cell option CellContext: Remove@x; Begin["MyContext`"]; x = 123; CellPrint[ ExpressionCell[ Manipulate[x + y, {y, 0, 1}], "Output", CellContext -> Context[] ] ] End[]; x = 456; (* does not change the value of Manipulate output *) MyContext`x = 789; (* changes the value of ...


1

Manipulate is a Dynamics module and I do not think the Context you are setting affects it. One can see this by doing Print[Context[]]; from inside Manipulate. The context you are setting do not extend to it: Begin["MyContext`"]; Print[Context[]]; (*this prints MyContext`*) Manipulate[ Print[Context[]]; (*this prints Global`*) x = 100; Print[&...


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