To attach the location of a text to a point programmatically

AndeanMath shared this question 2 years ago
Answered

Is it possible to attach the location of a text to a point with a command script? (so, if the point moves, the text moves too.)


82615d708f614780963f0b627d93b640


I know to do it with the command SetCoords, but both objects are not attached. If the point moves, the text keeps static.

Comments (9)

photo
2

Text( <Object>, <Point> )

photo
1

Thanks, Michael.Can I to avoid the creation of a second object?

photo
photo
2

iot works fine for me in ver 5

photo
1

¿Cuál método, Profe?

photo
photo
1

For me it is not clear what you want to achieve.

Attached is one of the many possibilities.

photo
1

Great. I want to get a construction like your implementation with a, B and text2.Thanks.

photo
photo
2

si tú creas un punto y luego un texto posicionado en ese punto entonces el texto se moverá con ese punto

creas el punto y cuando vayas a crear el texto seleccionando la herramienta texto haces clic en el punto y ya está, entonces puedes mover el texto un poco para situarlo respecto al punto pero solo en una zona cercana

si no quieres que se mueva más el texto respecto del punto debes seleccionar la propiedad de "fijo" para el texto y ya solo se moverá cuando se mueva el punto

si lo que quieres es que el texto no se mueva al hacer zoom o mover toda la ventana debes seleccionar "posicion absoluta en pantalla" si además quieres que no lo pueda mover el que usa el applet debes seleccionar fijo

photo
1

Excelentes tips, Prof. Muchas gracias.

photo
1

Excelentes tips, Prof. Muchas gracias.

photo
© 2023 International GeoGebra Institute