Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091628

Cursor can't be set on disabled controls

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.1
    • javafx

      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();
          }
      }

            Unassigned Unassigned
            cschudtjfx Christian Schudt (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Imported: