I would like to obtain something similar to this:
A user, has to answer the question selecting an answer from a popupmenu
and he can check it.
I wrote that:
DynamicModule[{r1,r2},listarisposte={PopupMenu[Dynamic[r1],
{"",Sequence @@ RandomSample[{"Sin(60)","Cos(60)"}]}]};
Row[Flatten[{{Text[Subscript["V","x"]],Text["=v*"], listarisposte,Text["40*1/2=20"]},
Button["Controlla", r2 = (r1 == "Cos(60)")],
Graphics[{Dynamic[If[r2, Green, Red, Gray]], Rectangle[{0, 0}]},ImageSize -> {20, 20}],
Dynamic[If[r2, "Giusto!", "Sbagliato, riprova!", ""]]}]]];
but it isn't very well styled.
How can I write 1/2
in the fraction form?
How can I resize the text? I tried with Style
but it doesn't work.
ToString[1/2, TraditionalForm]
or useHoldForm
withRow
etc, they don't convert it to strings in the linked question. $\endgroup$ – Kuba♦ May 30 '17 at 19:52