position of a check box

János Losonczi shared this question 8 months ago
Answered

Dear All,I'd like to switch between two points (CentralPoint_1 and CentralPoint_2) with the CenterView command, on that way, that ALL objects preserve their GG position. There are 2 objects, a point (A) and a check box (a) in my test applet. I'd like to set their GG coordinates with SetCoords command.

My problem, that coordinates of a check box can be set only in screen pixels, and not in GG coordinates. This way, when I switch between CentralPoint_1 and CentralPoint_2, point (A) behaves as I would like (stays at the GG position), but check box (a) stays at its screen pixel position.

See the attachment (position_test.ggb).

Are there workarounds to solve my problem?

Best regards,

JL

Commands I used:

CentralPoint_1 = (5, 0)
CentralPoint_2 = (20, 0)
CenterView(CentralPoint_1)
CenterView(CentralPoint_2)
SetCoords(A, 0,0)
SetCoords(a, 300,250) /* screen pixels */

Comments (2)

photo
2

Ich think this (Text-)CheckBox help

photo
1

Your advice works well, thank you for your help.

© 2019 International GeoGebra Institute