I am trying to create an interactive map that when you click a room, you get send to a more detail of it. I am struggling to put multiple buttons on an image as well as have them line up with the image properly. Does anyone have any tips on how to do this efficiently?


closed as too broad by MarcoB, Coolwater, José Antonio Díaz Navas, bobthechemist, rhermans Jul 7 '18 at 9:34

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ This is, I’m afraid, entirely too vague and broad as posted. Perhaps you could give us an example of what you have done so far. $\endgroup$ – MarcoB Jul 5 '18 at 4:21
  • $\begingroup$ Welcome to Mathematica.SE. Could you be more specific in your question? Please share the code you are working on. Only good questions are likely to get great answers. Your question is currntly on-hold because in its current form is off-topic. To rever that please edit your question to improve it. Also consider taking the tour. $\endgroup$ – rhermans Jul 7 '18 at 9:37

Actually, any button is an image. Therefore, you can create graphics background and put the button on it using Epilog->Inset[..] . The insets could be easy arranged according to certain coordinates within the background graphics as below:

bcol = Orange;
Graphics[{Gray, EdgeForm[{Black, Thick}], 
  Rectangle[{0, 0}, {100, 40}]}, 
 Epilog -> {Inset[Button["test", Print["!!"]], {70, 10}], 
   Inset[Dynamic@Button["ToRed", bcol = Red, Background -> bcol], {20,35}]}]

enter image description here

Buttons are nicely working..


Not the answer you're looking for? Browse other questions tagged or ask your own question.