The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->Radio buttons

mmacklem
2 stars
Radio buttons


Hi,

I am writing an application which involves incorporating a number of different distance metrics. I wanted the user to be able to specify only one of them at a time, which would be easiest with a Radio-button style of object. However, since I can only determine how to use regular buttons, I wanted to simulate a radio-button by defining several regular-buttons, and define the behaviour of each so that when one is pressed, the script unpresses any others that are pressed. Unfortunately, while I can determine within the script the state of a button, I've been unable to determine how to force the behaviour of a button within the script. Any ideas/suggestions? I haven't been able to find anything on buttons in the online documentation.

Thanks,
Mason

 
on: Fri 23 of Jan, 2009 [06:36 UTC] reads: 102630

Posted messages

author message
Aw: Radio buttons
on: Sun 25 of Jan, 2009 [14:50 UTC]
Mason,

you can set the "pressed-state" of a button using the pressed attribute of the text, e.g.

Text1.pressed=false


I attached a construction with basic Radiobutton behavior.

Ulli


attachment RadioButton.cdy (1.74 Kb)



Show posts:
 
Language