I am trying to modify the parameters of a system by clicking on its graphics. I am using ClickPane
with DialogInput
. A code example is as follows.
DynamicModule[{},
ClickPane[
Framed[Graphics[{Red, Disk[{0, 0}, 1]}, PlotRange -> {{-2, 2}, {-2, 2}}]],
(If[Norm[#] < 1, DialogInput[Grid[{{CancelButton[], DefaultButton[DialogReturn[1]]}}]]];) &
]
]
As expected, the Dialog
window appears with a click in the red circle. However, it takes a long time before it is enabled. I am new with Dynamic
modules. Could someone explain the reason of this?