title: How to set context menu width to match choice box
body: <p>I created ChoiceBox using scene builder 2.0 and attached to IntelliJ Idea and add below code to add item to ChoiceBox in Main class</p>
  
  <pre><code>ChoiceBox genderBox = (ChoiceBox) scene.lookup("#gender");
  genderBox.setItems(FXCollections.observableArrayList("Boy", "Girl"));
  genderBox.getSelectionModel().select(0); 
  </code></pre>
  
  <p>Choice box code from FXML is as below</p>
  
  <pre><code>&lt;ChoiceBox id="gender" prefHeight="16.0" prefWidth="150.0" GridPane.columnIndex="1" GridPane.rowIndex="11"&gt;
             &lt;GridPane.margin&gt;
                &lt;Insets left="10.0" /&gt;
             &lt;/GridPane.margin&gt;
  &lt;/ChoiceBox&gt;
  </code></pre>
  
  <p>Anyway, when running the Main class I see the choice box as below. choice box width is not matched with context menu(popup) width. </p>
  
  <p><a href="https://i.stack.imgur.com/GNc4P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GNc4P.png" alt="gender choice box"></a></p>
  
  <p>How to set a width to the context menu?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Anyway setting width to the context menu in combo box is working fine. So I moved with combo box. <a href="https://github.com/laki88/PatientDischargeForm/blob/master/src/main/resources/fxml/patientDischargeForm.fxml#L158" rel="nofollow noreferrer">see example fxml.</a></p>