We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I'm looking for a way to place text over top of an image toggle button. For the text, I need to be able to alter it when a separate button is pressed. I tried using a label, however, the button was drawn over top of it even though the GUI builder showed the label being on top. I looked through the G4P reference for image toggle buttons and labels, but was unable to find a solution.
Any help would be greatly appreciated, thank you.
Answers
Can't be done.
The GUI Builder does not control the order that G4P controls are drawn.
Just put the label immediately below the image toggle button.
Well, that's unfortunate. Thank you for answering.
There maybe a way of doing it. Make sure the top of the label is higher, smaller Y, than the toggle button. You can position the text inside the label with textAlign
G4P draws the controls in high Y to low Y order.
I was testing that out and that appears to be the case when overlapping labels and text fields as well as buttons and toggle buttons. However, when overlapping a button/toggle button with either a label or a text field the button is always drawn on top.