Radio buttons - text format

Hi everyone!
I can't seem to get this to work! I want the text on the radio buttons to wrap correctly as they reach the end of the stage (right now they just keep going forever. Here is the code I am using:
package {
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.text.TextFieldAutoSize;
    import flash.events.Event;
    import fl.controls.RadioButton;
    import fl.controls.RadioButtonGroup;
    public class QuizQuestion extends MovieClip {
        private var question:String;
        private var questionField:TextField;
        private var choices:Array;
        private var theCorrectAnswer:int;
        private var theUserAnswer:int;
        //variables for positioning:
        private var questionX:int = 25;
        private var questionY:int = 150;
        private var answerX:int = 25;
        private var answerY:int = 200;
        private var spacing:int = 25;
        public function QuizQuestion(theQuestion:String, theAnswer:int, ...answers) {
            //store the supplied arguments in the private variables:
            question = theQuestion;
            theCorrectAnswer = theAnswer;
            choices = answers;
            //create and position the textfield (question):
            questionField = new TextField();
            questionField.width = 775;
            questionField.wordWrap = true;
            questionField.multiline = true;
            questionField.text = question;
            //trace (questionField.width);
            questionField.autoSize = TextFieldAutoSize.LEFT;
            questionField.x = questionX;
            questionField.y = questionY;
            addChild(questionField);
            //Text Format for radio buttons
            var txtFmt:TextFormat = new TextFormat();
            txtFmt.font = "Arial";
            txtFmt.blockIndent = 2;
            txtFmt.color = 0x000000;
            txtFmt.size = 11;
            txtFmt.leading = 4;
            //create and position the radio buttons (answers):
            var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
            myGroup.addEventListener(Event.CHANGE, changeHandler);
            for(var i:int = 0; i < choices.length; i++) {
                var rb:RadioButton = new RadioButton();
                rb.setStyle("textFormat", txtFmt);
                rb.textField.autoSize = TextFieldAutoSize.LEFT;
                rb.label = choices[i];
                rb.group = myGroup;
                rb.value = i + 1;
                rb.x = answerX;
                rb.y = questionY + questionField.height + 25 + (i * spacing);
                addChild(rb);
        private function changeHandler(event:Event) {
            theUserAnswer = event.target.selectedData;
        public function get correctAnswer():int {
            return theCorrectAnswer;
        public function get userAnswer():int {
            return theUserAnswer;
As you can see, I managed to get the text field style of the radio buttons to use "txtFmt" as the style:
rb.setStyle("textFormat", txtFmt);
The issue:
If I add:
rb.textField.width = 352;
rb.textField.height = 60;
rb.textField.multiline = rb.textField.wordWrap = true;
inside the "for loop" that creates the radio button, it just makes my text go all crazy! It only extends the text about 30 pixels after the radio button and then starts wrapping it, making it all stack on top of each other. How can I make it create the radio button, show the text on the text field, wrap around once it reached the edge of the stage and the continue the next button.
thank you in advanced,
Rafa.

Kglad,
I added the trace command to the 1st frame of my FLA, and it shows the "test" message on the output window.
I am looking thru my code, but can't figure what could be overwritting it. This is what I have on the first AS file:
package {
    import flash.display.MovieClip;
    import flash.text.TextField;
     import flash.text.TextFormat;
    import flash.text.TextFieldAutoSize;
    import flash.events.Event;
    import fl.controls.RadioButton;
    import fl.controls.RadioButtonGroup;
    public class QuizQuestion extends MovieClip {
        private var question:String;
        private var questionField:TextField;
        private var choices:Array;
        private var theCorrectAnswer:int;
        private var theUserAnswer:int;
        //variables for positioning:
        private var questionX:int = 25;
        private var questionY:int = 150;
        private var answerX:int = 25;
        private var answerY:int = 200;
        private var spacing:int = 25;
        public function QuizQuestion(whichQuestion:int, theQuestion:String, theAnswer:int, ...answers) {
            //store the supplied arguments in the private variables:
            question = theQuestion;
            theCorrectAnswer = theAnswer;
            choices = answers;
               //Text Format for readio buttons
               var txtFmt:TextFormat = new TextFormat();
               txtFmt.font = "Arial";
               txtFmt.blockIndent = 2;
               txtFmt.color = 0x000000;
               txtFmt.size = 12;
               txtFmt.leading = 4;
            //create and position the textfield (question):
            questionField = new TextField();
            questionField.width = 770;
               questionField.wordWrap = true;
               questionField.multiline = true;
               questionField.text = question;
               //trace (questionField.width);
            questionField.autoSize = TextFieldAutoSize.LEFT;
            questionField.x = questionX;
            questionField.y = questionY;
               questionField.setTextFormat(txtFmt);
            addChild(questionField);
            //create and position the radio buttons (answers):
            var myGroup:RadioButtonGroup = new RadioButtonGroup("group1");
            myGroup.addEventListener(Event.CHANGE, changeHandler);
            var rbY:Number = 100;
               for(var i:int = 0; i < choices.length; i++) {
                var rb:RadioButton = new RadioButton();
                rb.setStyle("textFormat", txtFmt);
                rb.textField.width = 352;
                rb.textField.autoSize = "left";
                rb.textField.multiline  = rb.textField.wordWrap = true;
                rb.textField.autoSize = TextFieldAutoSize.LEFT;
                rb.label = choices[i];
                rb.group = myGroup;
                rb.value = i + 1;
                rb.x = 300;
                rb.y = rbY;
                rbY = rb.y+rb.height;
                addChild(rb);
        private function changeHandler(event:Event) {
            theUserAnswer = event.target.selectedData;
        public function get correctAnswer():int {
            return theCorrectAnswer;
        public function get userAnswer():int {
            return theUserAnswer;
This is the AS that creates the questions:
package {
    import flash.display.MovieClip;
    import fl.controls.Button;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    public class QuizApp extends MovieClip {
        //for managing questions:
        private var quizQuestions:Array;
        private var currentQuestion:QuizQuestion;
        private var currentIndex:int = 0;
        //the buttons:
        private var prevButton:Button;
        private var nextButton:Button;
        private var finishButton:Button;
        //scoring and messages:
        private var score:int = 0;
        private var status:TextField;
        public function QuizApp() {
            quizQuestions = new Array();
            createQuestions();
            createButtons();
            createStatusBox();
            addAllQuestions();
            hideAllQuestions();
            firstQuestion();
        private function createQuestions() {
            quizQuestions.push(new QuizQuestion(1, "1. Which of the following statements about the government auditor’s use of audit standards is least accurate? ",
                                                            1,
                                                            "Government auditors may be subject to a variety or range of audit standards.",
                                                            "Government auditors are not subject to audit standards for some types of work.",
                                                            "If the audit organization follows The Institute of Internal Auditors’ (IIA’s) International Standards for the Professional Practice of Internal Auditing (Standards), those Standards prevail over laws and regulations.",
                                                            "Different sets of audit standards that might be followed have many similarities."));
        private function createButtons() {
            var yPosition:Number = stage.stageHeight - 125;
            prevButton = new Button();
            prevButton.label = "Previous";
            prevButton.x = 30;
            prevButton.y = yPosition;
            prevButton.addEventListener(MouseEvent.CLICK, prevHandler);
            addChild(prevButton);
            nextButton = new Button();
            nextButton.label = "Next";
            nextButton.x = prevButton.x + prevButton.width + 40;
            nextButton.y = yPosition;
            nextButton.addEventListener(MouseEvent.CLICK, nextHandler);
            addChild(nextButton);
            finishButton = new Button();
            finishButton.label = "Finish";
            finishButton.x = nextButton.x + nextButton.width + 40;
            finishButton.y = yPosition;
            finishButton.addEventListener(MouseEvent.CLICK, finishHandler);
            addChild(finishButton);
        private function createStatusBox() {
            status = new TextField();
            status.autoSize = TextFieldAutoSize.LEFT;
            status.y = stage.stageHeight - 80;
            addChild(status);
        private function showMessage(theMessage:String) {
            status.text = theMessage;
               status.x = (stage.stageWidth / 5) - (status.width / 5);
        private function addAllQuestions() {
            for(var i:int = 0; i < quizQuestions.length; i++) {
                addChild(quizQuestions[i]);
        private function hideAllQuestions() {
            for(var i:int = 0; i < quizQuestions.length; i++) {
                quizQuestions[i].visible = false;
        private function firstQuestion() {
            currentQuestion = quizQuestions[0];
            currentQuestion.visible = true;
        private function prevHandler(event:MouseEvent) {
            showMessage("");
            if(currentIndex > 0) {
                currentQuestion.visible = false;
                currentIndex--;
                currentQuestion = quizQuestions[currentIndex];
                currentQuestion.visible = true;
            } else {
                showMessage("This is the first question, there are no previous ones");
        private function nextHandler(event:MouseEvent) {
            showMessage("");
               //This will not allow the user to continue forward unless they answer the current question
           /* if(currentQuestion.userAnswer == 0) {
                showMessage("Please answer the current question before continuing");
                return;
            if(currentIndex < (quizQuestions.length - 1)) {
                currentQuestion.visible = false;
                currentIndex++;
                currentQuestion = quizQuestions[currentIndex];
                currentQuestion.visible = true;
            } else {
                showMessage("That's all the questions! Click Finish to Score, or Previous to go back");
        private function finishHandler(event:MouseEvent) {
            showMessage("");
            var finished:Boolean = true;
            for(var i:int = 0; i < quizQuestions.length; i++) {
                if(quizQuestions[i].userAnswer == 0) {
                    finished = false;
                    break;
            if(finished) {
                prevButton.visible = false;
                nextButton.visible = false;
                finishButton.visible = false;
                hideAllQuestions();
                computeScore();
            } else {
                showMessage("You haven't answered all of the questions");
        private function computeScore() {
            for(var i:int = 0; i < quizQuestions.length; i++) {
                if(quizQuestions[i].userAnswer == quizQuestions[i].correctAnswer) {
                    score++;
            showMessage("You answered " + score + " correct out of " + quizQuestions.length + " questions.");
I also have a timer running on my FLA, but even if I comment out the timer, I still get the same issue.
thank you for your help,
Rafa.

Similar Messages

  • Ampersand in a radio button text

    Please, can somebody tell me how do I get an ampersand (&) in a radio button text using screen painter.
    Thanks

    On the Element list/General attr. tab I have:
    Name     Type     Line     Column     Format
    G_PRJ     Radio     21     30     CHAR
    G_PRJ     Radio     21     32     
    On the Element list/Texts/ I/O templates tab I have:
    Name     Type     Text
    G_PRJ     Radio     _
    G_PRJ     Radio     P&S
    With these settings, I am getting a fullstop instead of &, so adding the text in the element list didn't work for me. BTW The text where it says _ (underline) is read-only.
    Thanks.

  • Unable to define Radio Button Text field & unable to change column position

    Hi,
    While designing a screen in Screen Painter, I am unable to define Radio Button Text field as this option is not there in Graphical Element. And also I want to specify the starting position of column of that element different from the default value, but I am unable to define that because the field is non-editable.
    Can any one please help me out.
    Regards,
    Koushik

    Hi,
    Please find below the sample program from ABAP docu :
    PROGRAM demo_dynpro_input_output.
    DATA: input  TYPE i,
          output TYPE i,
          radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
          box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, exit(1) TYPE c.
    CALL SCREEN 100.
    MODULE init_screen_100 output.
      CLEAR input.
      radio1 = 'X'.
      CLEAR: radio2, radio3.
    ENDMODULE.
    MODULE user_command_0100 input.
      output = input.
      box1 = radio1.
      box2 = radio2.
      box3 = radio3.
      IF exit NE space.
        LEAVE PROGRAM.
      ENDIF.
    ENDMODULE.
    Here radio1(1) TYPE c is defined within the program but in the element list there are RADIO1 element exist. One is actual radio button and the other is Radio Button Text.
    I am not able to create that radio button text using same object name.
    Please suggest.
    Regards,
    Koushik

  • WPF: How to change the radio button text background?

    Is there a simple way that we can change the radio button text background? thx!
    JaneC

    If you literally mean the text background.
    It's a contentcontrol.
    You can put whatever you like in it to hold the text.
    As illustrated by my article:
    http://social.technet.microsoft.com/wiki/contents/articles/30173.wpf-tips-radiobutton-alignment.aspx
    Thus:
    <RadioButton Name="rbnIsolated">
    <TextBlock Text="Isolated Storage" Margin="0,-10,0,0" FontSize="22" Background="Pink"/>
    </RadioButton>
    Makes just the text background pink
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Inverse Radio button text sens

    Hello,
    Is there any possible customization for radio buttons to inverse radio text sens.
    What we have normally is this:
    RadioButton(text), what i want to have is (text) RadioButton.

    Here is some sample code for the label based alignment method. I did think Greg's quick hack in the prior thread of doing a lookup and reversing positions of the button and text in the original control was a bit better than this. But my guess is that either solution will work fine for you.
    import javafx.application.Application;
    import javafx.beans.property.*;
    import javafx.event.*;
    import javafx.geometry.Pos;
    import javafx.scene.Scene;
    import javafx.scene.control.*;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.Stage;
    /** Re: Inverse Radio button text sens */
    public class LabeledRadioButtonSample extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) throws Exception {
        ToggleGroup toggleGroup = new ToggleGroup();
        VBox layout = new VBox(15);
        layout.getChildren().addAll(
          new LabeledRadioButton("Left",  ContentDisplay.LEFT,  toggleGroup),
          new LabeledRadioButton("Right", ContentDisplay.RIGHT, toggleGroup)
        toggleGroup.getToggles().get(0).setSelected(true);
        layout.setStyle("-fx-background-color: cornsilk; -fx-padding: 10;");
        stage.setScene(new Scene(layout));
        stage.show();
      class LabeledRadioButton extends HBox {
        private ObjectProperty<RadioButton> radioProperty = new SimpleObjectProperty<>();
        public RadioButton getRadioButton() { return radioProperty.get(); }
        public LabeledRadioButton(String labelText, ContentDisplay labelPos, ToggleGroup toggleGroup) {
          setSpacing(10);
          setMaxWidth(Region.USE_PREF_SIZE);
          final RadioButton radioButton = new RadioButton();
          toggleGroup.getToggles().add(radioButton);
          // Add a label at the appropriate relative location..
          final Label label = new Label(labelText);
          switch (labelPos) {
            case LEFT:  getChildren().addAll(label,       radioButton); break;
            case RIGHT: getChildren().addAll(radioButton, label);       break;
            default: throw new IllegalArgumentException("Unsupported ContentDisplay type: " + labelPos); 
          // channel all clicks to the radioButton.
          setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override public void handle(MouseEvent event) {
              radioButton.fire();
              event.consume();
          // debug methods to show easily show extent of bounds.
          radioButton.setStyle("-fx-background-color: palegreen; -fx-border-color: blue;");
          label.setStyle(      "-fx-background-color: lightblue; -fx-border-color: orange;");
          setStyle(            "-fx-background-color: coral;     -fx-border-color: red;");
    }

  • Enable disable toolbar items on click on any checkbox,radio button,text box.

    Hi Friends,
    I am create application in eclipse RCP E4 and now i am trying to Enable disable toolbar items on click on any checkbox, radio button, text box .
    Please Help me friends....

    Hello friend my proble is solve and now i am sharing my solution ....
    I am create RCP application and view side any listener click event fire time apply this code
    IEvaluationService evaludationService = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    evaludationService.getCurrentState().addVariable("noOfRowsChecked", noOfRowsChecked);
    evaludationService.requestEvaluation("com.jobsleaf.propertytester.canDeleteItem");
    and add plug in extension and create property tester class means listener property tester class side apply this code
    IEvaluationService ws = (IEvaluationService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(IEvaluationService.class);
    Integer integer = (Integer) ws.getCurrentState().getVariable("noOfRowsChecked");
    if (integer != null)
    if (integer.intValue() > 0)
    return true;
    I hope useful above code when use property tester in eclipse RCP

  • Change text for radio button

    Hi all,
    Can we change text of radio button in selection screen after pressing push button?
    On screen, I will have push button for user to select one of two conditions, after selecting, I want radio button text be changed, for example : text > 'upload' will be changed to become 'upload sales'.
    can we?
    thanks
    Alia

    Hi alia,
    1. Very simple.
    2. The Important thing is
        NAME of the RADIO BUTTON.
    eg. name is XYZ.
         then we can access it in program like this :
        %_XYZ_%_app_%-text = 'Hello Sir'.
      (Please note the FORMAT - Its important)
    3. try this code (just copy paste in new program)
      IT WILL CHANGE TEXT OF RADIO BUTTONS
      WHEN PUSHBUTTON IS CLICKED.
    REPORT abc.
    PARAMETERS : abc  RADIOBUTTON GROUP g1,
                 xyz  RADIOBUTTON GROUP g1.
    SELECTION-SCREEN : PUSHBUTTON /15(25) pb USER-COMMAND pp .
    ABC, XYZ
    AT SELECTION-SCREEN .
      IF sy-ucomm = 'PP'.
        %_abc_%_app_%-text = 'Hello Sir'.
        %_xyz_%_app_%-text = 'How are u ?'.
      ENDIF.
    regards,
    amit m.

  • Radio button and select option in one line

    Hi,
    I have an requirement in which i need to display the radio button and select option in one line in an report program.
    How can i do it? 
    Regards,
    Arun.

    Hi,
    Try this code.
    TABLES: bkpf.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_r1 RADIOBUTTON GROUP a.
    SELECTION-SCREEN COMMENT 4(20) text-001 FOR FIELD p_r1.
    SELECTION-SCREEN COMMENT 30(12) text-002 FOR FIELD p_date.
    SELECTION-SCREEN POSITION 39.
    SELECT-OPTIONS: p_date FOR bkpf-budat OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: p_r2 RADIOBUTTON GROUP a.
    text-001 = " Radio button"
    text-002 = "Posting date"

  • Radio buttons breaking validation

    Hi all,
    I have a major problem with a form in that, bizarrely, radio buttons are breaking the validation of mandatory fields throughout the form.
    On trying everything to narrow down what the issue is, strangely this seems to be it. For example, mandatory fields validate up until the first instance of a radio button in the form, where all other successive mandatory fields fail to validate after it. Simply moving a working field to after that first instance of a radio button in the hierarchy breaks it.
    Validation is run through a custom submit button using execValidate.
    Form elements (including radio buttons, text fields, validation/submit buttons, etc.) have been tested independently, and frustratingly, work when lifted into a new document. Therefore there must be something else in the form that's making it fail. Recreating the form isn't really an option due to it's complexity and size.
    Any help would be massively appreciated.
    Thanks
    EDIT: Fixed. After whittling the form down to bare bones and going though the XML line by line (ouch), turns out the only real different thing between my original (broken) form and a new (working) test form was the target version. So changed back to 9.1. Curious, as using Acrobat XI ...
    Message was edited by: JdL

    Hi all,
    I have a major problem with a form in that, bizarrely, radio buttons are breaking the validation of mandatory fields throughout the form.
    On trying everything to narrow down what the issue is, strangely this seems to be it. For example, mandatory fields validate up until the first instance of a radio button in the form, where all other successive mandatory fields fail to validate after it. Simply moving a working field to after that first instance of a radio button in the hierarchy breaks it.
    Validation is run through a custom submit button using execValidate.
    Form elements (including radio buttons, text fields, validation/submit buttons, etc.) have been tested independently, and frustratingly, work when lifted into a new document. Therefore there must be something else in the form that's making it fail. Recreating the form isn't really an option due to it's complexity and size.
    Any help would be massively appreciated.
    Thanks
    EDIT: Fixed. After whittling the form down to bare bones and going though the XML line by line (ouch), turns out the only real different thing between my original (broken) form and a new (working) test form was the target version. So changed back to 9.1. Curious, as using Acrobat XI ...
    Message was edited by: JdL

  • Display radio button if number of rows in table equals 1

    I'm having issues buy there maybe a simple script out there.
    I have a table which can have up to four rows. If the table contains only one row, a radio button can be clicked to change the format/entry of cells within that row. I want to hide this radio button from a user if they have added more than one row to the table, and make it available again if they reduce the row count back to one.
    I have everything else working fine (Radio buttons changing format of row, add/removing rows in the table using buttons, row count in first column)
    Anybody got any ideas?
    Cheers
    Bobby

    Place the below code..Change the field names as per your form.
    if(Table1.Row1.instanceManager.count == 1)
         RadioButton.presence = "visible";
    else
         RadioButton.presence = "hidden";
    Thanks
    Srini

  • Using an array to assign values to 36 radio buttons

    Okay, here's another doozy for y'all.
    As some of you know, I'm trying to create a character creation program for D&D. When we roll ability scores, we roll 3 sets of 6 rolls, rolling 4 six-sided dice, rerolling 1s and dropping the lowest number, then add the highest 3 rolled numbers together.
    Great! Got that part done!
    The next thing I'm having some issues with is transferring those numbers to radio button text property. What I have done is created a form that has the rolled values in listboxes so the user can see what was rolled. They can only choose one "set"
    of rolls, so each set of 6 rolls is in a separate listbox. I can get the values from the listbox to an array, but I can't figure out how to get the values from an array to the radio buttons on the next form in the program.
    The next form in the program has 6 group boxes, each labeled with a different ability score name (ie: Strength, Dexterity, etc.). Also in each group box are 6 radio buttons. Each radio button in each group box needs to have the same values. For example,
    the first listed radio button in each group box needs to have the first value listed in the list box on the previous page. The second listed radio button in each group box needs to have the second value listed in the list box, and so on. I want it
    to automatically load, but I'll settle for ANY load at the moment!
    The other thing is that I don't want to write 36 lines of code for each group box's radio buttons! I would like to be able to populate the values with a loop. So, the biggest question is how to create an array containing all 36 radio buttons, then assign
    my list box values to them according to their position in the multidimensional array.
    Here is a tidbit so you'll have an idea what I'm looking at.
    list box 1 has values 17, 18, 8, 12, 15, and 13. I want the radio buttons in each group box on the second form to be 17 for the 1st radio button, 18 for the 2nd radio button, 8 for the 3rd radio button, 12 for the 4th radio button, 15 for the 5th radio
    button, and 13 for the 6th radio button.
    Any ideas?

    The array of radio buttons:
    radGr1_1
    radGr1_2
    radGr1_3
    radGr1_4
    radGr1_5
    radGr1_6
    radGr2_1
    radGr2_2
    radGr2_3
    radGr2_4
    radGr2_5
    radGr2_6
    radGr3_1
    radGr3_2
    radGr3_3
    radGr3_4
    radGr3_5
    radGr3_6
    radGr4_1
    radGr4_2
    radGr4_3
    radGr4_4
    radGr4_5
    radGr4_6
    radGr5_1
    radGr5_2
    radGr5_3
    radGr5_4
    radGr5_5
    radGr5_6
    radGr6_1
    radGr6_2
    radGr6_3
    radGr6_4
    radGr6_5
    radGr6_6
    Those listed with “radGr1” are in the first group box labeled grpST, “radGr2” are in the second group box labeled grpDX, and so on (grpCN, grpIQ, grpWS, grpCH). What I want the code to do is change the labels of the radio buttons so that the text displayed
    in everything with a suffix of “_1” is filled with the first number in the selected listbox. For example, if I select the first list box, the other 2 are cleared and only the 6 numbers in the first one are used for the rest of the program. If those numbers
    are 12, 13, 14, 15, 17, and 11, then everything with _1 at the end should have “12”, everything with _2 should have “13”, and so on. What I don’t want to have to do is initialize 36 elements, then have 6 different selections for each group box. I tried to
    attach an image, but it wouldn’t let me…something about verifying my account or something…
    Can I suggest a different layout?  It seems like the status selection process is over-complicating the code... please consider this form layout:
    Once the user has selected the set of rolls they want you use, you can then just work with that single listbox.  The radio buttons let them select a particular stat and the listbox lets them select a value.  The "<-" button then assigns
    the selected value to the selected stat, and removes it from the listbox.  The "->" button clears the selected stat and returns the value to the listbox.  The code is something like:
    Public Class Form1
    Private Sub SetButton_Click(sender As Object, e As EventArgs) Handles SetButton.Click
    If ChosenRollsListBox.SelectedIndex > -1 Then
    Select Case True
    Case StrRadioButton.Checked
    If Not StrLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(StrLabel.Text)
    End If
    StrLabel.Text = ChosenRollsListBox.SelectedItem.ToString
    ChosenRollsListBox.Items.RemoveAt(ChosenRollsListBox.SelectedIndex)
    Case DexRadioButton.Checked
    If Not DexLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(DexLabel.Text)
    End If
    DexLabel.Text = ChosenRollsListBox.SelectedItem.ToString
    ChosenRollsListBox.Items.RemoveAt(ChosenRollsListBox.SelectedIndex)
    Case ConRadioButton.Checked
    If Not ConLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(ConLabel.Text)
    End If
    ConLabel.Text = ChosenRollsListBox.SelectedItem.ToString
    ChosenRollsListBox.Items.RemoveAt(ChosenRollsListBox.SelectedIndex)
    Case IntRadioButton.Checked
    If Not IntLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(IntLabel.Text)
    End If
    IntLabel.Text = ChosenRollsListBox.SelectedItem.ToString
    ChosenRollsListBox.Items.RemoveAt(ChosenRollsListBox.SelectedIndex)
    Case WisRadioButton.Checked
    If Not WisLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(WisLabel.Text)
    End If
    WisLabel.Text = ChosenRollsListBox.SelectedItem.ToString
    ChosenRollsListBox.Items.RemoveAt(ChosenRollsListBox.SelectedIndex)
    Case ChaRadioButton.Checked
    If Not ChaLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(ChaLabel.Text)
    End If
    ChaLabel.Text = ChosenRollsListBox.SelectedItem.ToString
    ChosenRollsListBox.Items.RemoveAt(ChosenRollsListBox.SelectedIndex)
    End Select
    End If
    End Sub
    Private Sub ClearButton_Click(sender As Object, e As EventArgs) Handles ClearButton.Click
    Select Case True
    Case StrRadioButton.Checked
    If Not StrLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(StrLabel.Text)
    StrLabel.Text = "_"
    End If
    Case DexRadioButton.Checked
    If Not DexLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(DexLabel.Text)
    DexLabel.Text = "_"
    End If
    Case ConRadioButton.Checked
    If Not ConLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(ConLabel.Text)
    ConLabel.Text = "_"
    End If
    Case IntRadioButton.Checked
    If Not IntLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(IntLabel.Text)
    IntLabel.Text = "_"
    End If
    Case WisRadioButton.Checked
    If Not WisLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(WisLabel.Text)
    WisLabel.Text = "_"
    End If
    Case ChaRadioButton.Checked
    If Not ChaLabel.Text = "_" Then
    ChosenRollsListBox.Items.Add(ChaLabel.Text)
    ChaLabel.Text = "_"
    End If
    End Select
    End Sub
    End Class
    This may not suit your requirements but I thought it was at least worth considering an alternate design that would be much easier to implement.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • Capturing user response based on radio button

    I am trying to capture user response based on yes or no reply to a required radio button.  If they answer yes, they need to provide details.  The radio button values are N and Y, nothing listed under item, the captions are turned off. I used the LiveCyclePopUp.pdf sample by George Kaiser as a go-by and modified for my radio button/text field name and added the visible/invisible, but no luck.
    Here is what I'm trying, but it's not working, nothing happens when I click either yes or no, am using javascript. 
    Once this is working right, if possible, I would like to add to my submit button a double check to make sure if this radio button answer is Y and the text box is null, go back and provide the answer, but the most important part is to get this part working.  Any ideas what I'm missing?  Thank you!
    switch (this.rawValue)
        case "Y":
        Response25AY.presence = "visible";
        Response25AY = xfa.host.response("Please enter "YES" details (date, injury details, corrective action) below", "Q25A YES DETAILS", "Please enter "YES" details (date, injury details, corrective action) here . . . ");
        break;
        case "N":
        Response25AY.presence = "invisible";
        break;

    Hi,
    Firstly, the syntax is JavaScript, so when setting the Response25AY, you would need to include .rawValue:
    Use of quotation marks within the script will give a syntax error (around the YES).
    A small note: I would not duplicate the question as a default value. It does not really add value.
    So this should be closer:
    Response25AY.rawValue = xfa.host.response("Please enter YES details (date, injury details, corrective action) below", "Q25A YES DETAILS");
    Can you check the relative reference from the radio button group to the Response25AY object. It may be that the reference in the script is not full enough and is incomplete.
    Also I would place this script in the click event of the radio button exclusion group.
    Lastly, check the JavaScript Console (Control+J) when previewing the form, for errors.
    Hope that helps,
    Niall

  • Translation of radio buttons in query?

    Hi all,
    I need to translate a query from EN to ES, so I used transaction SQ07, It works fine exept for 2 radios buttons that I've in the selection-screen, I can't find them in SQ07, and of course I can't use the normal translation because it's a Query generated report and not a normal one.
    Any idea of where I need to look to translate the radio button text for a query ? All the others texts are translated ok.
    Thanks in advance.
    Enrik

    Hello Arun
    Don't you think it is much easier that the user <b>directly </b>selects the tabstrip instead of going to a specific tabstrip, push a certain radiobutton followed by pushing a OK button in the application toolbar???
    Regards
      Uwe

  • Why does disabling radio buttons change my formatted text size?

    When I recycle through a multiple choice quiz i have created,
    disabling the radio buttons also makes the label of the radio
    button resort to a (circa) point 12 font. There doesn't seem to be
    a way to get around this. Any advice?

    I guess you, like me, are a poor typist. There is a bug, but it only really shows up when you use the mouse to repeatedly position the cursor, or move around with the arrow keys.
    My "work around" is to press enter about three times as soon as I get into the typing space. Then if I accidentally go "past the end of the formating" it does not turn to rubbish. I did not realise I was doing the pressing of enter, as I wanted to get my signature out of my face while composing, but it appear to have had side benefits I just was not aware of.
    The other formatting hell you can get into is with text pasted from Microsoft Office. Any office suite can make things unpleasant for a while, but but the Microsoft product just stands out with it's references to Microsoft specific data structures and it's magical ability to make the mail ring the anti virus bell..

  • Using radio button instead of text field

    Hi. I need to convert a text field for radio button. The conversion is as follows: the user will choose one of three options on the radio button (gif, png and jpeg). If the user chooses the image format such as jpeg, for example, how should I put in value? Put image/jpeg and does not work. This text field belongs to a form that was generated automatically by a WebService Data Control. Thanks

    remove the text field.
    drag and drop that attribute from data control, choose selectOneRadio
    in the wizard window, select fixed list and select this particular attribute and then type gif, png and jpeg one by one.
    in the pagedef it would be something like below:
        <list IterBinding="myIterator0" id="image" DTSupportsMRU="false"
              StaticList="true">
          <AttrNames>
            <Item Value="image"/>
          </AttrNames>
          <ValueList>
            <Item Value="gif"/>
            <Item Value="png"/>
            <Item Value="jpeg"/>
          </ValueList>
        </list>whatever you select that values goes to db.

Maybe you are looking for