3 Replies Latest reply: Jun 24, 2013 9:59 AM by David Grieve RSS

    Setting size in CSS

    Martin Valenta
      Does anyone know why it is not possible to change the size property using something like "-fx-pref-width"?

      I want to do something like this:
      root.setPrefWidth(500);
      I tried:
      root.setStyle("-fx-pref-width: 500;");
      but it doesn't work.

      Any suggestion/explanation/another way to do it in CSS? How do you specify the size when you are using CSS?

      Edited by: 899666 on Dec 5, 2011 4:45 AM