3

Is there a way to have two controls that govern a single variable in a Manipulate? Specifically, I am using a Locator to select an {x,y} coordinate, but I would also like the user to be able to directly specify x and y, in InputFields.

Similar questions have been asked, but not with Manipulate and not with a 2D variable.

kglr
  • 394,356
  • 18
  • 477
  • 896
abwatson
  • 1,919
  • 1
  • 12
  • 19

1 Answers1

7

For example:

Manipulate[
 LocatorPane[Dynamic[{x, y}], Graphics[{Red, Disk[]}]],
 {{x, 0}, InputField},
 {{y, 0}, InputField}
 ]

Mathematica graphics

Michael E2
  • 235,386
  • 17
  • 334
  • 747