-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Normally the clearable TextField shows the x-button as long as it contains any text.
However, if the text is changed in rapid succession the closeable TextField can lose track and hide the x-button even if the TextField is not empty.
Here is an example demonstrating the issue:
(the Button toggles the x-button, the textField remains non-empty)
package com.onexip.wago.cleverscript.sheets.datalink;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
import org.controlsfx.control.textfield.TextFields;
public class ClearableTextfield extends Application
{
@Override
public void start(Stage stage) throws Exception
{
TextField textField = TextFields.createClearableTextField();
textField.setText("Hello");
Button button = new Button("Test");
button.setOnAction(e -> {
textField.setText("");
textField.setText("There!");
});
stage.setScene(new Scene(new HBox(textField, button)));
stage.show();
}
public static void main(String[] args)
{
launch(args);
}
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working