The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->Question: Text objects as buttons

dirkd
3 stars
Question: Text objects as buttons


While experimenting with text objects, I found out that one can use them as buttons. However, I didn't find any mention of buttons in the help pages.

Selecting a text and opening the inspector panel, I see two tick marks that can be independently set or cleared.

The first one reads [] Use text as button and turns the selected text into a two-state button that alternates on successive mouseclicks between a raised and a depressed state.

The second one reads [] Click button and makes the text into a one-state button. On mouse-down, the button is pushed inward, but on mouse-up it is raised again.

My question: is there any way to read the state of a two-state button in Cindyscript? A hidden property perhaps of the text object? As for now, it seems to me that both kinds of button behave in the same way.

 
on: Mon 23 of Oct, 2006 [21:18 UTC] reads: 102259

Posted messages

author message
Aw: Question: Text objects as buttons
on: Mon 30 of Oct, 2006 [15:21 UTC]
Dirk,

you can read the button state from CindyScript. Just use the pressed property ("Text0.pressed")

Ulli

PS: You are right, it was not in the documentation. I added it to the page Accessing geometric elements.




Show posts:
 
Language