kyma•tweaky . How . CreateARadioButton

Question (or Task)

How do I create a checkbox group as a method of selecting between conditional blocks of code so if one of the buttons is selected the others are automatically deselected?

Solution(s)

As I understand it, you have several options and you would like to select exactly one of them, is that correct? One way to implement this for the VCS would be to create an Array of the options and then use a fader to select one of them.

In this example (Using a labelled fader to function as radio button), !Selection chooses exactly one of the expressions to modulate the pitch of an oscillator:

(!Selection - 1) of: #({1 repeatingFullRamp} {1 repeatingTriangle} {1 s random})

To label the options in the VCS:

  1. Unlock the VCS and Double-click Selection
  2. From Options menu in VCS Editor, select Set tick marks and labels
  3. Distance between markers is 1
  4. Select List as the labels and click Edit
  5. Enter the labels: fullRamp, triangle, random (one per line)
  6. In the VCS editor, set the grid (in MinMaxGrid) to 1
  7. And set ShowNbr to No Nbr

Alternatively, you could take a look at 'widget sampler.pci' (in the Kyma folder under Xtra Tools). This is the example built in the "Writing your own Tools" chapter of Kyma X Revealed! (page 309) and it includes an example Radio Button (for choosing between Red Pill and Blue Pill).

-- CarlaScaletti - 17 Dec 2009

WebForm
Question: How do I create a radio button or checkbox group as a method of selecting between conditional blocks of code so if one of the buttons is selected the others are automatically deselected?
Keywords: radioButton select array tools

----- Revision r1.1 - 17 Dec 2009 - 17:01 GMT - CarlaScaletti
Copyright © 1999-2014 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding kyma•tweaky? Send feedback.