Skip to content

Commit

Permalink
Enhance phoneNumberField with country dropdown visibility control
Browse files Browse the repository at this point in the history
Introduced a CheckBox bound to a new showCountryDropdownProperty() inside SinglePhoneNumberFieldApp. This permits users to toggle visibility of the country dropdown in the phoneNumberField. It enhances UI customization, allowing users to tailor interface to their needs. Code UI was also updated to reflect the dropdown's visibility status.
  • Loading branch information
dlemmermann committed Nov 24, 2023
1 parent 096f3e2 commit fb4aae7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ public void start(Stage stage) {
CheckBox disableCountryCodeBox = new CheckBox("Disable country dropdown");
disableCountryCodeBox.selectedProperty().bindBidirectional(field.disableCountryDropdownProperty());

CheckBox showCountryCodeBox = new CheckBox("Show country dropdown");
showCountryCodeBox.selectedProperty().bindBidirectional(field.showCountryDropdownProperty());

CheckBox editableBox = new CheckBox("Editable");
editableBox.selectedProperty().bindBidirectional(field.editableProperty());

vBox.getChildren().addAll(new Separator(), clearButton, showExampleBox, countryCodeVisibleBox, disableCountryCodeBox, editableBox);
vBox.getChildren().addAll(new Separator(), clearButton, showExampleBox, countryCodeVisibleBox, showCountryCodeBox, disableCountryCodeBox, editableBox);

ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(vBox);
Expand Down

0 comments on commit fb4aae7

Please sign in to comment.