Tag Info

New answers tagged

7

If you want full flexibility you should try EventHandler and graphics primitives. If you can decipher the following example you will get the idea: color = Black; positions = Position[DiskMatrix[5], 1]; disks = {color, Disk[#, 0.4]} & /@ positions; eventHandler[item : {c_, obj_: Disk[p_, _]}] := {c, EventHandler[obj, "MouseClicked" :> (disks = ...


5

Step 1 As a very quick example of how one might start, with the limitation of only one "type" available: convert[Grid[m_?MatrixQ, ___]] := m[[All, All, 1]] Defer[convert]@Grid[ConstantArray[RadioButton[], {4, 7}], Spacings -> {0.2, 0}] Which outputs: You then make a selection: And evaluate it (the output), yielding: {{False, False, False, ...


2

If it were a venn diagram, clicked would be a subset of dragged (at least in the mind of whoever implemented this). You can reproduce what (I think) you want by adding a null event for "clicked": EventHandler[ Framed[1], {"MouseClicked" :> Null, "MouseDragged" :> (Print@RandomReal[])}] ---EDIT--- Or, for that matter, as per your comment, it is ...


1

Ok, I got it. I can't find simplier method, but this one actually works for me. I don't create variables for every single TextField. While using BitAnd[] for example I'm doing it this way: SetPropertyValue[{"siec1", "text"}, ToString[BitAnd[ToExpression[PropertyValue[{"O1", "text"}]], ...


0

So I found a way: Using InputFields for both in- and output arbitrarily. Ranking the InputFields to automatically choose the field for output, although this could be achieved in many other ways, e.g. checkboxes etc. Achieving immediate responsiveness in all Inputfields upon editing using ContinuousAction. Help-function, ranking and choosing ...


1

I'm still not sure about details of behaviour you are after but you can certainly build on this: Basicaly you can use the second argument of Dynamic. ClearAll[a, b, c]; a = b = c = 1; Grid[{ {"a", "b", "c"}, { InputField[ Dynamic[a, (a = #; If[# =!= Null, c = a b/2]) &]], InputField[ Dynamic[b, (b = #; If[# =!= Null, c = a b/2]) &]], ...



Top 50 recent answers are included