-
Enhancement
-
Resolution: Unresolved
-
P4
-
fx2.1
I cannot change the cursor on disabled controls.
My use case:
I want to disable a node, while a Task is running and simultaneously change the cursor to the wait cursor.
I figured out, that I can set the cursor on the scene instead, but I still thought this is worth a bug.
I think the cursor should switch to default, e.g. on a disabled TextField, but if I explicitly set one, I expect the node to use it.
import javafx.application.Application;
import javafx.scene.Cursor;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class TestApp3 extends Application {
public static void main(String[] args) throws Exception {
launch();
}
public void start(final Stage stage) throws Exception {
VBox root = new VBox();
Button button = new Button("Test Button");
root.getChildren().add(button);
root.setDisable(true);
root.setCursor(Cursor.WAIT);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
}
My use case:
I want to disable a node, while a Task is running and simultaneously change the cursor to the wait cursor.
I figured out, that I can set the cursor on the scene instead, but I still thought this is worth a bug.
I think the cursor should switch to default, e.g. on a disabled TextField, but if I explicitly set one, I expect the node to use it.
import javafx.application.Application;
import javafx.scene.Cursor;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class TestApp3 extends Application {
public static void main(String[] args) throws Exception {
launch();
}
public void start(final Stage stage) throws Exception {
VBox root = new VBox();
Button button = new Button("Test Button");
root.getChildren().add(button);
root.setDisable(true);
root.setCursor(Cursor.WAIT);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
}
- relates to
-
JDK-8090379 Tooltip doesn't show for disabled Control
-
- Open
-