Topic
  • 1 reply
  • Latest Post - ‏2019-06-18T17:07:49Z by O.Wilkop
Christopher Cote
Christopher Cote
67 Posts

Pinned topic Placing radioBox on separate line

‏2019-06-18T16:11:39Z |

I have another item that my customer would like to add to his script.  He would like to add a dialog containing a radioBox with 3 choices.  I have been working with the radioBox example from the reference manual, but can't figure out how to get the selections to appear on the line below the text that describes it.  In the example, it has:

DB dinnerBox = create("Dinner");
string meals[] = {"Pizza", "Pasta", "Burger", "Tacos"};
DBE dinnerRadio = radioBox(dinnerBox, "Main Course: ", meals, 2);

void placeOrder(DB dinnerBox) {
    int i = get dinnerRadio;
    string mealStr = meals[i];
    ack "Ordering " mealStr " now!";
}
apply(dinnerBox, "Order", placeOrder);
show dinnerBox;

When the dialog appears, the list of meal choices appear in the same line as the words "Main Course: ".  I've tried adding \n's (the usual newline character) within the string "Main Course: " to place the choices on a separate line, but the choices still appear in the same line.  How would I make the list of meals display under the text?

 

Chris

  • O.Wilkop
    O.Wilkop
    125 Posts
    ACCEPTED ANSWER

    Re: Placing radioBox on separate line

    ‏2019-06-18T17:07:49Z  

    Add a label() with the text "Main Course:" and leave the label for the radiobox empty.

  • O.Wilkop
    O.Wilkop
    125 Posts

    Re: Placing radioBox on separate line

    ‏2019-06-18T17:07:49Z  

    Add a label() with the text "Main Course:" and leave the label for the radiobox empty.